Wow, these postings are popping up fast. The slowness is a non-issue now. What happened ? The work of some little elves ?
There was a thread going around on this command-line thing a few months ago. I think the Subject heading was "Parameterizing a net". Many (or at least several) of us would like to do this, I think. In response to that thread, there was talk of editing .net files, and also of modifying dx binaries to do parameterization, but there seemed to be no major conclusion to the discussion, except for the fact that there is currently no way to send command-line parameters. Like Chris said, if you just want to change the data file name to import (but not use the FileSelector, so I'm assuming in script mode - no vpe or control panel pops up when dx is invoked ?? There is no mention of this detail), you could keep the same file name but change the data inside. But another possibility is to first describe the data in a .dx file (which specifies what data file to read), and import the .dx file instead of the data file. Then to change the current data file, you could do a search and replace (easy edit) within the .dx file. If you want to change a bunch of other parameters (like different range values to scale data, or something), why not assign these values as attributes to the field that is imported via the .dx format file (the attribute assignments could be easily edited, as well). Then make and save your net so that it grabs the values from the attribute rather than from a Selector. Peter's suggestions sound interesting, too. I don't know anything about dxlink, though, so I probably couldn't reproduce #2. #1 looks worth a try, but I'm not sure if I could follow everything with such a short description (and no one holding my hand !) But this seems to be such a big issue (it is for me !) that I would probably try struggling through all the options. And yes, my vote is for some *hero* to revolutionize OpenDx by making System have an output like suggested. >You might be able to (shell dependent) >MYFILE=foo dx -edit General.net >Then in General.net have ImportSpreadsheet use the "!" feature to echo $MYFILE >(directly or through a shell script) and if necessary other junk to satisfy >ImportSpreadsheet, then use the column name or data value to get MYFILE's >setting into your net, to feed to the filename input of the desired Import. >You could hide this ugliness in a macro. >You could also write (or someone could write) a trivial dxlink program that >starts dx with all remaining command-line parameters except the name=value >pairs that you strip off your dxlink program's command line and then send to dx >over the link. Your net would then use DXLInputs to get the values where they >need to go (I think what Chris was getting at). >In terms of future changes to opendx to make it easy, or at least >straightforward: >IF (oh, if only!) System had an output then you could echo the environment >variable and then Parse it in your net. System would be remarkably more useful >for other purposes too. >IF we permitted a command line argument to set name=value pairs, the net could >specify the name via DXLInput as above, and one could skip the "trivial dxlink >program" hassle. This might be generalized to command-line specified script >commands which could prove very useful.
