Moldflow Insight Forum
Welcome to Autodesk’s Moldflow Insight Forums. Share your knowledge, ask questions, and explore popular Moldflow Insight topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API macro, disposing synergy

1 REPLY 1
Reply
Message 1 of 2
Anonymous
553 Views, 1 Reply

API macro, disposing synergy

 Hi,

I've realized a VBS automation script using your  Moldflow API's and everything works correctly.

My only question is:

Is there any way to dispose correctly the Synergy interface?

 

To be clear, using your example script is possible to run Synergy, but there is no any method to close it.

http://wikihelp.autodesk.com/Simulation_Moldflow/enu/2013/Help/Insight/5756-Applicat5756/5778-Exampl...

 

Running:

cscript.exe //Nologo script.vbs

The cscript termates correctly but the Synergy interface remains up.

 

Can anybody help me?

 

Thanks

 

Simone Genovese

 

 

Tags (3)
1 REPLY 1
Message 2 of 2
nordhb
in reply to: Anonymous

Hi,
is a while since you posted this question, and maybe you already sorted it out.

Anyway, there is a way. It is a bit harsh and terminates all synergy.exe processes, no prompts.

Example:

SetLocale("en-us") 
Set Synergy = CreateObject("synergy.Synergy") 
Synergy.SetUnits "METRIC" 
MsgBox "Done?" 
'** terminates all synergy.exe no prompt 
For Each objProcess In GetObject("winmgmts:").InstancesOf("Win32_Process")   
     If objProcess.Name = "synergy.exe" Then objProcess.Terminate 
Next 
Wscript.Quit

 

Regards,
Berndt



Berndt Nordh

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report