Over the past few days I have used the "Save Current" Preference of the Metadata settings to learn the correct header format for my text file and the File>Export feature in the View>Flythrough menu to find out the correct format of an xml file for that feature so that I could import an xml file with specific data points. These features are extremely helpful learning tools. Would it be possible to replicate something like this as the scripting functions are being developed and the improved shell is under development. One sequence which would be very helpful is the display setup. If someone uses the interactive display, would there be a way to dump the commands to set up the screen dimensions, centering and zoom. This may need to include the data loaded (or lack of it). Jon! -Not sure how crazy this would be to code, just asking if its a possibility .
Importing your own xml is already possible in flythrough, the documentation for that is incomplete on the idv website, but I think that it may have been unintentional since the documentation ends mid-sentence. I included the flythrough information as an example of something which is extremely helpful in a few of the McV features. The feature which exports to a file information entered interactively, has been a great learning tool. The export feature formats the information in a way which makes it possible to import back into McV. In this way, I can learn how to format my own data for import into McV. I was thinking of a similar feature for scripting...
A user loads their data Sets the screen size to 500x500 Centers on a lat/lon of -15 55 Clicks zoom twice (or scrolls in - how scripts will handle this is being decided). Then they might click a File>Export>Export as python script
and get something like withManagedDataSource("magic") #magic refers to the fact that testing this is on my todo list #and I don't know how to use this yet idv.getStateManager().setViewSize(java.awt.Dimension(500,500)) theDisplay=createDisplay('imagedisplay',a) mydisplay=firstDisplay() # replaces vms=idv.getVMManager().getViewManagers()
I spoke with Tom W. He said it would not be possible to separate all the java instances and create a coherent script. In general, the purpose of the bundle was to fulfill the need to do something like I describe in the original post. At the same time, it would be really useful to have a few very simple scripts in the documentation which illustrate how to set up a display through a script. We have talked about this at scripting meetings, so it may be covering old ground.
Thanks for the follow-up. This new info and request to add simple scripts which illustrate how to set up a display through a script will be in the inquiry so will be addressed there.