Hi, I need to generate automatically the .MoML file and run the Ptolemy simulation. For that I need to set into the .MOML file a property that will be red by Actor when it starts. I've added in the .MoML file stuff like that: <entity name="FiltersSim" class="ptolemy.actor.lib. FiltersSim "> <doc> Filter Simulator</doc> <property name="_location" class="ptolemy.kernel.util.Location" value="{195, 125}"> </property> <property name="serviceId" class="ptolemy.actor.parameters.PortParameter" value="1001"> </property> </entity> The parameter that must be red by the FilterSim actor is "serviceId" How can I read this parameter set into the ,MoML file from my Actor instance ? All the example I found are defining in the Actor java code, a Parameter and use the .setExpression(...) method to set a value.
But in my case this is the reverse path I require. I need to set the value into the .MoML and just read from my Actor code when it is initialize() [or when Actor constructor is invoked ?] Do you have a sample code for that ? Thanks for your help Cheers Vincent