Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bd

Pages: [1]
1
Ok, thank you.

bd

2
How can I get the values "0.5" & "Time" from the description. With parsing ?

3
Ok thank you. I will try it out :)

4
Ok I tried this way.
Code: [Select]
EA.Element sourceElement = repo.GetElementByID(id);
                   
                    if (sourceElement.MetaType == "AcceptEventTimerAction")
                    {
                       
                        XmlDocument xml = new XmlDocument();
                        string query = repo.SQLQuery("SELECT * FROM t_xref WHERE Description=\"@PROP=@NAME=kind@ENDNAME;@TYPE=ActionKind@ENDTYPE;@VALU=AcceptEventTimer@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;\"");
                        //System.IO.File.WriteAllText(@"C:\text.xml", query);
                        XmlReader xmlreader = XmlReader.Create(new StringReader(query));
                        using (xmlreader)
                        {
                            while (xmlreader.Read())
                            {
                                if (xmlreader.Name == "Client")                                {

                                    // I am a bit confused here
                                 
                                    EA.Element swComponent = repo.GetElementByGuid(xmlreader.ReadInnerXml());
                                 
                                }
                            }
                        }
                       


                    }

5
Hi Geert,
I mean these ones.
Thank you.

bd


6
Ok, I will try to explain it again.

My target is: Developing an own Add-in, with C# as language, for Enterprise Architect. The Add-in should be an AUTOSAR XML-Exporter.

What I did so far: I use the Example AUTOSAR Model from LieberLieber, so I can test my own ARXML-Exporter. Until now, my ARXML-Exporter exports the data of existing SW-Components and the associated Ports.

Where am I stuck: One of the SW-Component contains an Internal-Behavior-Element. In this element, there are Runnables (Btw. I am able to get the data of the Runnables). In addition there is a Timer-Event-Element. When I double-click on the element, I can see the properties. In the properties, there is an item named "Triggers". When I click on Triggers, I can see the Features like "Name", "Type", "Specification". Now I want to read out this Features with my script and export them also to the ARXML-File.
I thought I could read out this features with, for example, "eventElement.properties.item(1).Name","eventElement.properties.item(1).Type" or "eventElement.properties.item(1).Specification".
I know it is not elegant, but I didn't find another solution.

I am asking for a way to get the values of These features. I hope you understand now my Problem

Best regards,
bd
             

7
thank you for your help btw. :) I am trying my best to get these data :/

8
Ok I matched the element's GUID. I used the GUID in "repo.GetElementByGuid(GUID)" but I get the same results.
I only Need the Trigger's Type,Name and Specification from the action's element.

9
Hi,

thank you for the answer.
I used your description in the SQL-Query like this.

string name = repo.SQLQuery("SELECT Name FROM t_xref WHERE Description=\"@PROP=@NAME=kind@ENDNAME;@TYPE=ActionKind@ENDTYPE;@VALU=AcceptEventTimer@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;\"");
...

I saved the result into an XML-File.
I got this result
...
-<Data>

-<Row>

<Name>CustomProperties</Name>

</Row>

</Data>
...

But the Name of the Timer-element is "trg_50ms".

I am a bit confused. What is my mistake ?

Best regards,
bd

10
Hi,

Toolbox -> More Tools -> LieberLieber AUTOSAR Engineer -> AUTOSAR Behavior -> AUTOSAR Event (Accept Timer)


11
Hello everyone,

I am trying to read out (with a C#-script), all the data of my Softwarearchitecture and export the data into an AUTOSAR XML-File.
One of the SW-Components has an internal behavior, which contains runnables. Furthermore there is a timer-element, which is acting as a trigger.

The timer element has properties like "General" and "Trigger". The "Trigger"-property contains "Name", "Type" and "Specification". My problem is now to get the values of these attributes.
I tried for example "timerelement.Properties.item(1).Name;" etc. but I didn't get a useful result.  :(   

Are you so Kind and show me an example how to get the values of the Trigger ?

Thank you,
bd
 

Pages: [1]