import and export of xml-Models

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
ChSch
Hero Member
Hero Member
Posts: 21
Joined: 07 Oct 2012, 11:18

import and export of xml-Models

Post by ChSch »

Hello,

I use the import/export function of the UaModeler 1.3.

Question 1: What is the function of the "Hash" and when does it change?

Code: Select all

        <Extension>
            <ModelInfo Tool="UaModeler" Hash="VxIZE8a0WJaHokkrKY1W+g==" Version="1.3.0"/>
        </Extension>
I try to do the following:
- model a myModel in your tool
- export a myModel.xml
- add some extra information to it with Extensions
- import the myModel.xml and add some additional model parts with the UaModeler
- export myModel.xml again

Question 2: When I have this in myModel.xml

Code: Select all

    <Extensions>
        <Extension>
            <ModelInfo Tool="UaModeler" Hash="VxIZE8a0WJaHokkrKY1W+g==" Version="1.3.0"/>
        </Extension>
        <Extension>
            <myOwnExtension myAtt="aAttribute">
        </Extension>
    </Extensions>
the UaModler don't import the file and says: "Selected file is not a valid input for the UaModeler"

What can I do to achieve my use case?
It is ok for me if the UaModeler ignores my own extension, but it should import the rest of the model.
After modeling, I can add my own extension again to the exported model.

Best regards
ChSch

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: import and export of xml-Models

Post by Support Team »

Hello,

Question 1:
We use the Hash to check whether the XML file has been edited manually. This information is useful if the importing of an XML file causes problems.

Question 2:
There is a syntax error.

Code: Select all

            <myOwnExtension myAtt="aAttribute">
should be

Code: Select all

            <myOwnExtension myAtt="aAttribute"/>
You have to add the extension after exporting the XML file again. UaModeler does not save it in this version.

Best regards
Support Team

ChSch
Hero Member
Hero Member
Posts: 21
Joined: 07 Oct 2012, 11:18

Re: import and export of xml-Models

Post by ChSch »

Thanks that helps.
By the way, if I use Extensions in UAObject or UAVariable the UaModeler import and export this.
So, only Extensions direct under UANodeSet are not exported. Thats not a big problem so far, but I hope you will fix this in a next UaModeler version?

Just to double check it: If I add correct Extensions, I can ignore your hash?

Code: Select all

<ModelInfo Tool="UaModeler" Hash="VxIZE8a0WJaHokkrKY1W+g==" Version="1.3.0"/>
because it is only used for your intern UaModeler tests?


Best regards
ChSch

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: import and export of xml-Models

Post by Support Team »

Yes, you can ignore the hash.

We will import and export the "UANodeSet-Extensions" with UaModeler version 1.4

Best regards
Support Team

Post Reply