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 - Kenny

Pages: [1]
1
Hi,
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?

Thanks.
BR
Kenny

2
Bugs and Issues / Re: Cannot create Executable Statemachine artifact
« on: April 17, 2017, 08:37:06 am »
Hello Kenny,

Maybe you need to enable the 'Core Extensions' MDG Technology. If disable it, we can not create Executable StateMachine objects.
(EA version 13 shows an error when disabled it and try to create it.)

HTH,

Thank you very much for your hints. Yes, after having enabled the "Core Extensions" MDG Technology, I was able to create Executable Statemachine artifacts.

BR,
Kenny

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

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

http://www.sparxsystems.com.au/enterprise_architect_user_guide/12.1/software_engineering/modeling_executable_statemachines.html


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?

Thanks.

/Kenny

4
Hi,
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" http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/standard_uml_models/file_field_substitution_macros.html

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?

Thanks.
/k

5
Hi,
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>
    <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"/>
    </ownedPort>
    <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>
    <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>
    <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>
    <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"/>
    </ownedConnector>
</packagedElement>

6
Thank you very much. The "Right-click->synchronise stereotype" did the job. Also thank all for your response.

/k

Right-Click on the icon of the object with the updated stereotype in the toolbox of your MDG.  You'll find the "Synchronise Stereotype" menu option.  Follow the instructions.

We use this fairly frequently as our Modelling Environment evolves.

The first time you use it it will add any missing tagged values (properties) to the identified objects.  Naturally, once you've done that, if you repeat the process immediately, NO objects should be updated.

HTH,
Paolo

7
Hi,
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?
Thanks.

8
Bugs and Issues / Re: C++ codegen error for ptr paramter of method
« on: September 09, 2013, 05:57:34 pm »
Quote
Did you try using the parameter editor for this? I've noticed that parsing plain UML op parameter syntax might fail, while specifiying types with the parametr editor works.

HTH
GŁnther

yes, I did try to use the parameter editor to enter the parameters. The problem occurred when I tried to generate to c++ code. To my suprise, I tried to use the reverse engineering to import a piece of c++ code that contains also the pointer paramter in the method and then generate the c++ code. It worked very well. By looking at the operation field, the parameter has type "bool*". My original model looks the same as it. It is really strange that EA cannot handle my code, but it can handle the imported code. I must have missed some points.

Thanks.
/Kai



9
Bugs and Issues / C++ codegen error for ptr paramter of method
« on: September 08, 2013, 09:55:10 pm »
Hi,
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.

/Kai





Pages: [1]