ActiveX_Running the Model for a certain Duration

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
Posts: 7
Joined: Tuesday 22 May, 2012 - 09:23

ActiveX_Running the Model for a certain Duration

Post by a.jorge »


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
User avatar
Posts: 182
Joined: Thursday 11 November, 2010 - 14:12

Re: ActiveX_Running the Model for a certain Duration

Post 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.
Post Reply