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