1 Reply Latest reply on Nov 29, 2012 6:19 PM by Artem Taturevych

    Unlink EquationMgr

    Kwinto Kwin

      Hi all!

       

      I want unlink my equation manager, but the code does not work:

       

       

      Option Explicit

      Dim swApp As SldWorks.SldWorks
      Dim swModel As SldWorks.ModelDoc2
      Dim swEqnMgr As SldWorks.EquationMgr


      Sub main()
      Set swApp = Application.SldWorks
      Set swModel = swApp.ActiveDoc
      Set swEqnMgr = swModel.GetEquationMgr

      Dim value As Boolean
      value = False
      MsgBox (value)
      swEqnMgr.LinkToFile = False


      End Sub

       

      any suggestions??

       

        • Re: Unlink EquationMgr
          Artem Taturevych

          Emptying the file path in addition to unlink API does the trick. Try this:

           

          Dim swApp As SldWorks.SldWorks

          Dim swModel As SldWorks.ModelDoc2

          Dim swEqnMgr As SldWorks.EquationMgr

           

          Sub main()

           

              Set swApp = Application.SldWorks

           

              Set swModel = swApp.ActiveDoc

           

              Set swEqnMgr = swModel.GetEquationMgr

           

              swEqnMgr.LinkToFile = False

              swEqnMgr.FilePath = ""

           

          End Sub

          _______________________

          Regards,

          Artem Taturevych

          Application Engineer at Intercad

          http://intercad.com.au/

          Tel: +61 2 9454 4444