• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Autodesk Simulation Moldflow Insight

    Reply
    New Member
    Posts: 1
    Registered: ‎02-15-2013

    API macro, disposing synergy

    155 Views, 1 Replies
    02-15-2013 06:01 AM

     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

     

     

    Please use plain text.
    Product Support
    Posts: 308
    Registered: ‎03-23-2009

    Re: API macro, disposing synergy

    04-05-2013 02:22 AM in reply to: genovese

    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
    Moldflow Support Specialist
    Product Support
    Autodesk, Inc.

    Please use plain text.