Home Overview FAQ Documentation Download Mailing List Geomview For Windows? Support Users Development Bug Reporting Contributing Contact Us Sponsors
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Closed REQ 5163]: Question regarding external module
> How do I handle this in the emodule-define... command? First, you could write emodule-define commands that hardwire the name of the input and output files, eg (emodule-define "my module" "mpm file1 file2") (emodule-define "mymod/file3/file4" "mpm file3 file4") (emodule-define "mymodv3" "mpm file5 file6") This is only convenient if you generally use only a small number of standard configurations. If you'd like to be able to type input filenames when the module is invoked, you can communicate with your module via standard error (file descriptor 2). Then you'd invoke it with (emodule-define "my module" "mpm <&2") and your program would have code like fprintf(stderr, "input file 1? "); scanf("%s", file1); fprintf(stderr, "input file 2? "); scanf("%s", file2); > can I print stuff other than > what Geomview needs at the standard output, like iteration number, variable >values, etc? Note that you can also you stderr to write out iteration numbers, in answer to question 2. You'd just say something like fprintf(stderr, "iteration: %d x: %f y: %f", itnum, x, y); > 2) Can Geomview read data from only the standard output of the external > module. Can't I read data from the .off and .vect files in which I dump 'em? Yes, you can tell Geomview to read a .off or .vect file. You can have your program send Geomview a command like (geometry "newthing" { < file.off }) or even just (load file.off} Depending on your needs, you might want to set up the external module so that's there's an option to just dump its output files directly into the Geomview display without the intermediate step of saving them to disk. >3) Can only executable files be used as external modules? Can I use the .off >and .vect files as external modules? In other words, is it possible that >when I invoke Geomview, I don't have to load these data files, rather they are >are already there and I have to just click on a particular file to display it? Well, if there are particular configurations of geometry files that you commonly use you could make "external module wrappers" to load them in, for instance (emodule-define "config1" "( progn (load file1.off) (load file2.vect) )") (emodule-define "config2" "( progn (load file1.off) (load file4.off) (load file3.off) (load file19.vect) )") and so on. It wouldn't make much sense to do something like (emodule-define "loadfoo" "(load foo.off)") since it's as easy to click on the line "foo.off" in the file browser as it is to click on "loadfoo" in the modules browser. (The "progn" command groups other commands as a single unit, so they all execute before interactive control resumes. It's a good idea to wrap multiple commands that should be executed simultaneously in a "progn".) Also, you can put any command you'd like into a file named .geomview, which is read at startup time. If you always want to load the same two pieces of geometry, you could just put commands to load them automatically in your .geomview file. >Thanks a lot for your help. Geomview has really been of great help to me. We're always glad to hear that it's useful! Hope this helps, let us know if you need more clarification or have more questions. Tamara Munzner The Geometry Center ((555) 555-5555 munzner at geom.umn.edu http://www.geom.umn.edu/people/munzner.html
|
||
Home | Overview | FAQ | Documentation | Support | Download | Mailing List Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors |
|||
site hosted by |