Inventor General Discussion

Inventor General Discussion

Reply
Active Member
jd.gomez242
Posts: 8
Registered: ‎03-21-2012
Message 1 of 6 (475 Views)
Accepted Solution

Dynamic Simulation Automatization in API

475 Views, 5 Replies
04-10-2012 08:37 AM

Hello, I'm designing multiple elements for a vehicle. I need to evaluate multiple dynamic results of multiple possible designs. All the design is parametric so it modifies quickly but I can't find a way to run the dynamic simulation multiple times automatically and get the results from the output grapher for each simulation. 

 

I am trying to do it via API but can't find the class of the dynamic simulation environment in the Object Model Chart to program it via .NET. 

Any ideas would be appreciated

 

Thanks

 

 

Hi jd.gomez242,

 

SimulationManager is under ComponentDefinition.

 

Thanks to Bob van Der Donk, here is a sample VBA that can get you started to run a simulation:

 

Sub playanimation()

Dim odoc As AssemblyDocument

Set odoc = ThisApplication.ActiveDocument

Dim dsman As SimulationManager

Set dsman = odoc.ComponentDefinition.SimulationManager

Dim dssim As DynamicSimulation

Set dssim = dsman.DynamicSimulations.Item(1)

‘Run the simulation from construction mode without activating Simulation Player!

If Not (dssim.IsInSimulationMode) Then

dssim.ComputeSimulation

End Sub

 

Hope this helps! -Hugh

Employee
henderh
Posts: 651
Registered: ‎06-07-2007
Message 2 of 6 (466 Views)

Re: Dynamic Simulation Automatization in API

04-10-2012 10:24 AM in reply to: jd.gomez242

Hi jd.gomez242,

 

SimulationManager is under ComponentDefinition.

 

Thanks to Bob van Der Donk, here is a sample VBA that can get you started to run a simulation:

 

Sub playanimation()

Dim odoc As AssemblyDocument

Set odoc = ThisApplication.ActiveDocument

Dim dsman As SimulationManager

Set dsman = odoc.ComponentDefinition.SimulationManager

Dim dssim As DynamicSimulation

Set dssim = dsman.DynamicSimulations.Item(1)

‘Run the simulation from construction mode without activating Simulation Player!

If Not (dssim.IsInSimulationMode) Then

dssim.ComputeSimulation

End Sub

 

Hope this helps! -Hugh



Hugh Henderson
Simulation QA Engineer
DLS
Active Member
jd.gomez242
Posts: 8
Registered: ‎03-21-2012
Message 3 of 6 (450 Views)

Re: Dynamic Simulation Automatization in API

04-10-2012 02:45 PM in reply to: henderh

Thanks for the quick response. But I can't find the SimulationManager type. 

 

Dim dsman As SimulationManager 

 

reports: Compile error: User-defined type not defined

 

Where can I import it from? I'm using Inventor 2012, don't know if there I'm missing a library or something.

 

Thanks

 

Juan Diego Gómez

Employee
henderh
Posts: 651
Registered: ‎06-07-2007
Message 4 of 6 (441 Views)

Re: Dynamic Simulation Automatization in API

04-10-2012 04:18 PM in reply to: jd.gomez242

Ahhh...apologies Juan.  The DS API is new to R2013.



Hugh Henderson
Simulation QA Engineer
DLS
Active Member
jd.gomez242
Posts: 8
Registered: ‎03-21-2012
Message 5 of 6 (431 Views)

Re: Dynamic Simulation Automatization in API

04-10-2012 08:30 PM in reply to: henderh

So there is no DS API in R2012... but is there any other way to automatize the Dynamic Simulation?

 

Juan Diego Gómez

ADN Support Specialist
philippe.leefsma
Posts: 658
Registered: ‎06-02-2009
Message 6 of 6 (231 Views)

Re: Dynamic Simulation Automatization in API

07-12-2013 12:27 AM in reply to: jd.gomez242

Hi Juan Diego,

 

Well if there is no API there is no other way to automatize it, you need to upgrade version, sorry for the bad news.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!