Page 1 of 1

ActiveX_Running the Model for a certain Duration

Posted: Saturday 10 May, 2014 - 13:19
by a.jorge
Hello,

How can we use ActiveX from another program to run the model for a certain duration and then brings some of the results (for instance, the content of an atom after 30 sec. simulation) back to the program which we executed the ActiveX command.
I have checked the ActiveX Example written in VB and can run 4Dscripts from the other program but I could not find any 4DScript command for determining the run duration or to return some value after simulating.

Thank you in advance

Re: ActiveX_Running the Model for a certain Duration

Posted: Tuesday 13 May, 2014 - 16:35
by MatthijsJongboer
Enterprise Dynamics allows full control through 4DScript.
The 4DScript you need here is StopTime. This calls the time the simulation will stop.
You can also use this command to set the stoptime using StopTime := 30.

When the simulation has ended, you can use 4DScript again to call the value that you want.
With variable run lengths, you can have your application poll to see whether the simulation has ended.