Updating diagram xml model [message #1794893] |
Mon, 10 September 2018 13:07 |
Roman Rutsevich Messages: 11 Registered: June 2017 |
Junior Member |
|
|
Hello!
I bumpled into situation that I don't know how to deal with.
I got a diagram model which has an element with some amount of in ports and out ports.
Please, see the picture element_with_ports_and_table.jpg.
As well on picture I have properties view where I got a table "Port Infos" of this ports. Ports are shown at the table in order of adding on the element.
This part of model in xml looks like this (ports order - In0, Out0, In1, In2, Out1):
<element name="element" alias="ELEMENT_K">
<portInfos name="In0" alias="ELEMENT_KN_In0">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="Out0" alias="ELEMENT_KN_Out0">
<portAttrbutesInfo portType="ATTR_OUT"/>
</portInfos>
<portInfos name="In1" alias="ELEMENT_KN_In1">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="In2" alias="ELEMENT_KN_In2">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="Out1" alias="ELEMENT_KN_Out1">
<portAttrbutesInfo portType="ATTR_OUT"/>
</portInfos>
</element>
The question is: I need to get in model xml first inputs and then outputs - In0, In1, In2, Out0, Out1 to be model xml like this:
<element name="element" alias="ELEMENT_K">
<portInfos name="In0" alias="ELEMENT_KN_In0">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="In1" alias="ELEMENT_KN_In1">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="In2" alias="ELEMENT_KN_In2">
<portAttrbutesInfo dataScale="ATTR_NONFIXED"/>
</portInfos>
<portInfos name="Out0" alias="ELEMENT_KN_Out0">
<portAttrbutesInfo portType="ATTR_OUT"/>
</portInfos>
<portInfos name="Out1" alias="ELEMENT_KN_Out1">
<portAttrbutesInfo portType="ATTR_OUT"/>
</portInfos>
</element>
but If I move ports in table "Port Infos" by arrows like in picture changed_order_in_the_table.jpg,
the diagram does not get "dirty state", so it does not affect model xml to get order I need and keeps an old one order (In0, Out0, In1, In2, Out1),
but not a new one (In0, In1, In2, Out0, Out1) like I set in table by moving ports (changed_order_in_the_table.jpg).
If I only change the element name, then model xml is affected by order changes from the table, but I would like to get it without additional actions like change the name or something.
Did anyone meet this situation?
Thank you in advance, Roman.
[Updated on: Mon, 10 September 2018 13:13] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03294 seconds