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

Pages: [1] 2
1
Hi,
   How do I get elements  from an IBD diagram in a generated code template?

2
I created a custom language based on C++. Implementation Code Templates are copied/pasted from C++ ones.

I also created a MDG technology corresponding to this custom language .
When generating code using this template,the %fileImports% and %fileHeaders% macro from my "Import Section Impl" template is empty . Let me notice that everything's fine if I choose to generate the MyClass code by using the default C++ language.

Why?

3
Hello all,

is it possible to create a custom code template who generate 2 files like C++ (.hpp and .cpp)?

Thank you.

4
Automation Interface, Add-Ins and Tools / How to use a Time Trigger
« on: July 31, 2020, 05:04:20 pm »
I set a time trigger,how do I set the specification of the time trigger and how do I trigger the time trigger?

5
I want to use C++ for simulation with an executable state machine, but I'm prompted to use the VS compiler, but for some reason I can't use VS, so can I use another compiler to support C++ simulation? What do I need to do if I can?

6
Search the help for executable state machines. This allows multiple instances of state machines.

I want to use C++ for simulation, but I'm prompted to use the VS compiler, but for some reason I can't use VS, so can I use another compiler to support C++ simulation? What do I need to do if I can?

7
I have a class,and a statemachine under it.During the simulation,I want to create at least 2 instances of this class,how can I run the same number  of statemachine as the instances for each instance?Does EA support this feature? 

8
Hi!
I want to use SysML to model a SystemC project. I want to use the SystemC library. How should I import the SystemC library into EA?

9
If you're in simulation you need Javascript, not JScript.

One of the differences is that you need new COMObject().

I got  the same error after I changed activexobject to ComObject :'(

10
Can you be a bit more specific? This seems like a very general question with many different possible answers.

Geert

When I use the simulation of EA,I want to read a local json file with javascript,I try to write code in effect like this:
                var fso, ts, s ;
      var ForReading = 1;

      fso = new ActiveXObject("Scripting.FileSystemObject");
      ts = fso.OpenTextFile("D:\\EAWorkSpace\\config.json", ForReading);
      s = ts.ReadAll();
but I got a error that OpenTextFile is not a function,I don't know why,can you give me a way to do it?

11
When I use simulation, how should I read the data in the local file?

12
That would be something like

Code: [Select]
Repository.Execute "update x from t_xref x set x.description = '@PROP=@NAME=effect@ENDNAME;@TYPE=String@ENDTYPE;@VALU=the new code@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;' where x.Name = 'CustomProperties' and x.Client = '" & myElement.ElementGUID & "'"
Geert

I'm sorry to bother you again, but I have another question. When I want to change the guard of the connector line with script, what should I do?

13
That would be something like

Code: [Select]
Repository.Execute "update x from t_xref x set x.description = '@PROP=@NAME=effect@ENDNAME;@TYPE=String@ENDTYPE;@VALU=the new code@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;' where x.Name = 'CustomProperties' and x.Client = '" & myElement.ElementGUID & "'"
Geert


My problem is solved,thanks a lot!

14
I think he means the code you can type in the field Effect on an Action.

This is actually stored in t_xref with
Name = CustomProperties
Description = @PROP=@NAME=effect@ENDNAME;@TYPE=String@ENDTYPE;@VALU=Code in the effect field@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;

You might be able to read the field using EA.Element.CustomProperties, but I believe you'll have to update the database directly in order to edit it.
You can use the unsupported and undocumented method Repository.Execute to execute update or insert statements on the database. (at your own risk)

Geert


I have no idea how to do it,can you give me a example?Thanks a lot!

15
Does anyone knows how to change the code in effect by using script?

Pages: [1] 2