>Hi! > >I have the following problem: I have an OpenDX-program General.net >which I use to view different data files. The way I usualy work is the >following: >I call 'dx -program General.net' then I use a FileSelector to select >the data-file I want to view. Then I execute the program. >The way I would like to work is: >'dx -program General.net -execute_on_change *something* datafile' >where *something* is the part i don't know about. > >Is there a way to achive this (or something similar). >I havn't found anything like this in the manuals. > >(Note:I would still like to edit the program with the VPE) >
There is no trivial way to do this. Unlike many other command-line driven programs you are familiar with, any DX net can contain an arbitrary number of Import/ImportSpreadsheet/ReadImage "input ports" (if you want to think of them like that). There is no mechanism to assign an arbitrary number of command-line parameters to these ports in the correct order. So it's not like a simpler Unix utility where you can just pipe stdin. I don't think I've ever used -program: I've always used "dx -edit General.net" (saves a couple keystrokes anyway (:-) ). This puts you into the edit/execute mode (it comes up in "end execution" mode initially, though you correctly know how to bring it up in "execute on change"). Frankly, you are doing what I've been doing for over 10 years: start the DX editor with a given net, change parameters to taste, then execute. If you are trying to make an end-user deliverable, I think you will have to either use a generic name for the data file and externally, and in advance of starting DX, make the currently desired file have that name, or show the user how to use FileSelector (or learn how to use DXLink). The generic filename solution has a weakness in that you must then teach the user how to do a Reset Connection (a very scary sounding, but quite benign proposition) if you externally change the data in the same-named file after DX has loaded and cached an earlier version under that name. I did not explain how to hack a script since you say you want to continue to edit in the VPE (my preferred method also). Probably obvious to you that given a script, you could easily parameterize the input name by passing it in via a shell script. This >could< be done to the saved net file itself, by the way, such that you change the net just before DX opens it. That is a relatively thin sheet of ice to venture onto but it will work. Chris Pelkie Vice President/Scientific Visualization Producer Conceptual Reality Presentations, Inc. 30 West Meadow Drive Ithaca, NY 14850 [EMAIL PROTECTED]
