If you start vergil on the command line, you get exactly what it takes to what you want, I think. It has the form
java -Xmx256M "-Dptolemy.ptII.dir=..." -Duser.language=en -Duser.region=US -classpath " ... lots of stuff here ..." ptolemy.vergil.VergilApplication
You could look at main() in ptolemy.vergil.VergilApplication.
E.g., I get (the -verbose option is something we've added here in our CVS tree):
$ vergil -verbose
"/cygdrive/c/j2sdk1.4.2_06/bin/java" -Xmx256M "-Dptolemy.ptII.dir=C:\ptII" -Duser.language=en -Duser.region=US -classpath "C:;C:\ptII/lib/diva.jar;c:/Program Files/Eclipse/plugins/org.eclipse.jdt.core_3.0.1/jdtcore.jar;c:/Program Files/Eclipse/plugin.eclipse.osgi_3.0.1/osgi.jar;c:/Program Files/Eclipse/plugins/org.eclipse.core.resources_3.0.1/resources.jar;c:/Program Files
pse/plugins/org.eclipse.core.runtime_3.0.1/runtime.jar;C:\ptII/lib/ptCal.jar;C:\ptII/lib/java_cup.jar;C:\ptII/lib/chic.jar;C:/vendors/misc/colt/colt.jar;C:\ptII/vendors/sun/commapi/comm.jar;C:\ptII/lib/sootclasses.jar;C:\ptII/lib/jasminclasses.jar;c:k1.4.2_06\jre\lib\rt.jar;C:\ptII/lib/ptjacl.jar;C:\ptII/lib/jython.jar;C:\ptII/vendors/sun/jxta/jxta.jar;C:\ptII/vendors/sun/log4j.jar;C:\ptII/vendors/sun/jxta/beepcore.jar;C:\ptII/vendors/sun/jxta/jxtasecurity.jar;C:\ptII/vendors/sun/jxta/cryptix-asr;C:\ptII/vendors/sun/jxta/cryptix32.jar;C:\ptII/vendors/sun/jxta/jxtaptls.jar;C:\ptII/vendors/sun/jxta/minimalBC.jar;;C:/ProFiles/java/j2re1.4.2_06/lib/ext/QTJava.zip;C:\ptII/lib/mapss.jar;C:\ptII/lib/saxon7.jar;C:\ptII/vendors/misc/x10/tjx10p-11/li
.jar;.;.;C:\PROGRA~1\JMF21~1.1E\lib\sound.jar;C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;C:\PROGRA~1\JMF21~1.1E\lib;\"C:\PROGRA~1\Jave1.4.2_06\lib\ext\QTJava.zip\"" ptolemy.vergil.VergilApplication
Opening user library C:\Documents and Settings\eal\.ptolemyII\UserLibrary.xml... Done
By the way, to get your changes reflected in a model, you should use the requestChange() method of ptolemy.kernel.util.NamedObj.
Edward
At 03:43 PM 4/1/2005 -0800, Sreenivas, Giridhar C wrote:
Hi,
I'm pretty new to Ptolemy and I'm just getting my feet wet with the structure of the application. I have a few questions.
I will be integrating a tool with Ptolemy that will basically be providing another view on the Ptolemy models. I would like to have changes made in my view reflect on Ptolemy models in real time, while being able to switch between my view and the Ptolemy view. So far I have determined that this would require invoking some application-like instance of Ptolemy, getting access to the Director and then its respective Actors. I'm stuck on the first step, invoking an application-like instance of Ptolemy and I'm trying to do this for now using the provided demos.
Does anyone have any experience doing this? Anyone very familiar with the loading mechanism that might be able to give me some pointers? So far I've stepped through Vergil a bit and determined that the Configuration class is responsible for instantiating the MoMLParser that in turn brings up the models, but it's not clear how to get that started without invoking all of Vergil.
My attempts to use ptolemy.actor.gui.CompositeActorApplication, PtExecuteApplication, MoMLApplication and PtolemyApplication have not worked with the -class command line argument, specifying the package location of the composite actor xml files. For example:
PtolemyApplication -class ptolemy.domains.ci.demo.Router.Router
where from the working directory, /ptolemy/domains/ci/demo/Router/Router.xml exists, the execution does nothing.
I'd appreciate any help and guidance.
Thanks,
Giridhar "Giri" Sreenivas Software Engineer - Modeling, Simulation and Information Sciences Advanced Technology Center Lockheed Martin - Space Systems Company B/153 2K4 Phone: (408) 742-5914 [EMAIL PROTECTED]
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]
------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]