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.

Topics - Kenny

Pages: [1]
I am trying to generate c++ code from state machine by using "executable statemachine" artifact. The c++ code can be generated successfully, but the content in the state's entry/do/exit sections are ignored. All of the attributes and operations under a state symbol are ignored.

Is there a way to tell the generator to generate also code out of the state's entry/do/exit sections?


Bugs and Issues / Cannot create Executable Statemachine artifact
« on: December 14, 2016, 09:08:52 am »

I followed the instruction in the users guide to create an "Executable Statemachine" artifact, but it failed.

Both drag&drop the element onto the class diagram and "Add new element" don't work. No response at all. I am using the version 12.1.1230 (Build - 1230) Ultimate Edition.

Can anyone help me?



I am writing a transformation template, where I want to convert the linked files (Class Property->Related->Files) of a class into a tag of the target class. I haven't found a way to access the linked files with the code generation template macro. A set of macros I found is "Linked File Field Substitution Macros"

but since the files are in a list, I need to write a line that is something like %list="LinkedFile"%. But there is no list macro called "LinkedFile".
Can anyone help me to do this?


I have several sysml internal block diagrams, where I connected the ports of block instances with "connectors". I want to generate a script from these IBD and get the connection information. I tried with transformation templates (section Connector), but no success. Also, with EA scripts, it is not possible to get the connection information. If I call  Repository.GetTreeSelectedObject().Connectors.Count, I get 0. The only way that I can see at the moment is to export XMI file from the package. However, I have to write some XMI parser to do my job. Does anyone know how to use EA functionality to extract connectors from block/class instances? From the XMI file, it seems that the information is part of the block/class instance.

Code: [Select]
<packagedElement xmi:type="uml:InstanceSpecification" xmi:id="EAID_6CEF6ED8_62D2_4e4b_9B7A_DEA66884003C" name="BUS" visibility="public" classifier="EAID_F50B1D1C_9B67_4a29_A13A_CCCC303059C1">
    <ownedPort xmi:type="uml:Port" xmi:id="EAID_E429196D_FDA1_4c66_BBBC_1C425296A4B0" name="ISOCKET" visibility="public" aggregation="composite" isService="true" isStatic="false" isReadOnly="false" isDerived="false" isOrdered="false" isUnique="true" isDerivedUnion="false">
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="EAID_LI000001_FDA1_4c66_BBBC_1C425296A4B0" value="1"/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="EAID_LI000002_FDA1_4c66_BBBC_1C425296A4B0" value="-1"/>
    <ownedPort xmi:type="uml:Port" xmi:id="EAID_68C4CF3E_D92D_4cf3_A842_F3DBAB84CBE8" name="OSOCKET" visibility="public" aggregation="composite" isService="true" isStatic="false" isReadOnly="false" isDerived="false" isOrdered="false" isUnique="true" isDerivedUnion="false">
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="EAID_LI000003_D92D_4cf3_A842_F3DBAB84CBE8" value="1"/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="EAID_LI000004_D92D_4cf3_A842_F3DBAB84CBE8" value="-1"/>
    <ownedConnector xmi:type="uml:Connector" xmi:id="EAID_4C9AFDEE_B1A6_42be_BC54_5DC86BD5DFB0" visibility="public">
<end xmi:type="uml:ConnectorEnd" xmi:id="EAID_SC000000_B1A6_42be_BC54_5DC86BD5DFB0" role="EAID_68C4CF3E_D92D_4cf3_A842_F3DBAB84CBE8"/>
<end xmi:type="uml:ConnectorEnd" xmi:id="EAID_DS000000_B1A6_42be_BC54_5DC86BD5DFB0" role="EAID_14D75233_4334_4331_AC67_F06398E9AD6E"/>
    <ownedConnector xmi:type="uml:Connector" xmi:id="EAID_60A940D5_CDD3_4b79_9ADE_D813294BC5D1" visibility="public">
<end xmi:type="uml:ConnectorEnd" xmi:id="EAID_SC000000_CDD3_4b79_9ADE_D813294BC5D1" role="EAID_68C4CF3E_D92D_4cf3_A842_F3DBAB84CBE8"/>
<end xmi:type="uml:ConnectorEnd" xmi:id="EAID_DS000000_CDD3_4b79_9ADE_D813294BC5D1" role="EAID_F8EB2E55_11B0_4935_9AAA_7ADF039A22A3"/>
    <ownedConnector xmi:type="uml:Connector" xmi:id="EAID_BEBF7DC1_AC76_4f13_8136_88923A750ABB" visibility="public">
<end xmi:type="uml:ConnectorEnd" xmi:id="EAID_SC000000_AC76_4f13_8136_88923A750ABB" role="EAID_68C4CF3E_D92D_4cf3_A842_F3DBAB84CBE8"/>
<end xmi:type="uml:ConnectorEnd" xmi:id="EAID_DS000000_AC76_4f13_8136_88923A750ABB" role="EAID_A599B2F7_E8EC_457c_A1C4_22D321169A42"/>
    <ownedConnector xmi:type="uml:Connector" xmi:id="EAID_F9DE3785_4D91_4229_B48C_EF67B66A090C" visibility="public">
<end xmi:type="uml:ConnectorEnd" xmi:id="EAID_SC000000_4D91_4229_B48C_EF67B66A090C" role="EAID_68C4CF3E_D92D_4cf3_A842_F3DBAB84CBE8"/>
<end xmi:type="uml:ConnectorEnd" xmi:id="EAID_DS000000_4D91_4229_B48C_EF67B66A090C" role="EAID_FA5761EE_9714_469a_92A8_B82702FDEF38"/>

I developed a profile, which contains seveval stereotypes. I had applied these stereotypes in my model and they are spread out in my design. Now I added a new property to one of the stereotypes, but the model that used this stereotype is not updated to reflect this property. It would be quite a time-consuming process to redraw my model with the "new" stereotype. Is there a way to update the existing model to reflect the change of the stereotype?

Bugs and Issues / C++ codegen error for ptr paramter of method
« on: September 08, 2013, 09:55:10 pm »
I want to generate c++ code from a class diagram. But when I tried to set the type of a parameter of a method to pointer, the code generation enginee reported an error:

Unexpected symbol: *
Code generation failed.

I tried the following variants in the parameter field:
a: unsigned int* (error)
a*: unsigned int (good, but the generated code is not what I expected.)
*a: unsigned int (error)

Thanks in advance.


Pages: [1]