question

Sakamoto Ko avatar image
0 Likes"
Sakamoto Ko asked Sakamoto Ko commented

Error occurs when saving in XML format

Saving the model, with some model parameter tables, in XML format and then re-open that fsx file and reset it, I get an error.

exception: FlexScript exception: Setting up property to node that does not exist at MODEL:/Tools/ParameterTables/Parameters>variables/parameters/1/Value/onSet


Is there a workaround?

sample1.fsm

sample1.fsx

FlexSim 23.0.14
flexsim xml
sample1.fsm (37.9 KiB)
sample1.fsx (894.6 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·

https://docs.flexsim.com/en/24.1/Reference/DeveloperAdvancedUser/XML/XML.html

There seems to be a common structure how a treenode property in model should look like. You can compare this structure of a standard property with a structure of a parameter treenode in an XML file.
You could divert the faulty parameter treenode to a sub set of your XML map and test which value causes this problem.

0 Likes 0 ·
Sakamoto Ko avatar image Sakamoto Ko Joerg Vogel commented ·

Thank you for your reply.


The error message indicates that there is a problem with the On Set node.

Therefore, we created a model with different processes to be executed on reset.

Parameter1 was set to nothing, Parameter2 was set to process property changes, and Parameter3 was set to process changes to the number of objects.

sample2.fsm


When I saved the XML, reopened it and reset it, an error occurred only with Parameter3.

sample2.fsx


I saved only the ParameterTable to a separate XML and compared the On Set nodes for parameter2 and parameter3, but could not find any obvious problem.

parameterTables.fsx


Would modifying any part of this XML information solve the problem?




0 Likes 0 ·
sample2.fsm (29.6 KiB)
sample2.fsx (693.1 KiB)

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Sakamoto Ko commented

Thanks for reporting this - I will send this into the developers.

The problem is that the operator reset position container is being set to NULL and not updated to point to the model when the xml is loaded:

    <node f="42" dt="3"><name></name><data><coupling>null</coupling></data></node>

It seems that clicking on the operators (in the tree or 3D view) is enough to set the container to the model and remedy the issue.


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sakamoto Ko avatar image Sakamoto Ko commented ·

Thank you for your reply.


It looks like the method you described will eliminate the error.

Thank you very much.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.