chanon_s wrote:Dear Olivier
Please see the fUMLHelper.getFeatureValue() and fUMLHelper.setFeatureValue() methods in this
link or the <md.root>/openapi/docs/SimulationJavaDoc.zip file.
Chanon S.
No Magic Customer Support
Hello,
back to my plugin, facing other issues meanwhile, so now the current problem to solve is how to use this fUMLHelper.setFeatureValue() method while running a CSM simulation session.
in my SysML model I can retrieve a Value Property using this:
- Code: Select all
for (Element ValueEl : BlockEl.getOwnedElement()) {
if (ValueEl.getHumanType().equals("Value Property") && ValueEl.getHumanName().equals("Value Property "+valueName)) {
Application.getInstance().getGUILog().log("DEBUG: "+ ValueEl.getHumanName()+" found!");
ValueFound = ValueEl;
great, from this I'd like to update this valueProperty (typed as integer) by:
- Code: Select all
fUMLHelper.setFeatureValue((StructuredValue) ValueFound ,"count", "13");
my plugin execution is then stopped, CSM simulation still running.
no information in csm.log unfortunately, so I'm pretty I'm wrongly using the fUMLHelper.setFeatureValue API call
How can I use it the right way?
a very basic usage would be appreciated, from a block "MyBlock", with a Value Property "MyValue", what would be the correct syntax to update "MyValue' with a new value?
Thanks,
Olivier