0 Replies Latest reply on Sep 11, 2014 7:18 AM by Sonen Saji

    How to set variable by input formula? (EPDM API)

    Sonen Saji

      Hello.

       

      I want to realize following.

       

      *PreCondition

      Set input formula to Variable A.

      The inupt formula is if set "AAA" to Variable A, set "BBB" Variable B.

       

      *TOWANT

      If set "AAA" to Variable A by EPDM API, set "BBB" Variable B automatically.

       

      *Wrong Source...

      The following source coutldn't realize.

       

          Private Sub ExeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExeButton.Click
              Dim vault As IEdmVault13 = New EdmVault5
              vault.LoginAuto(VaultsComboBox.Text, Me.Handle.ToInt32)

       

              Dim filePath As String
              filePath = "C:\testvault\Part1.SLDPRT"

       

              Dim fileObj As IEdmFile8
              fileObj = vault.GetFileFromPath(filePath)

       

              Dim enumVarObj As IEdmEnumeratorVariable9
              enumVarObj = fileObj.GetEnumeratorVariable(filePath)

       

              Dim getVarSuccess As Boolean
              Dim attrObj As Object = Nothing
              getVarSuccess = enumVarObj.GetVar("A", "", attrObj)
              enumVarObj.SetVar("A", "", "AAA", False)

              enumVarObj.CloseFile(True)

          End Sub