6 Replies Latest reply on Apr 9, 2014 2:14 PM by Deepak Gupta

    Custom properties not updating

    Todd Bennett

      I'm not sure why this isn't working (below).  I use this in many places, but in this case it isn't actually deleting nor adding the properties.


      I have attached my "work in progress" file because I probably missing something.  There are other subs to get the ConfigNameSTR and the Xstr values.


      Dim ConfigNameSTR as String

      Dim PartOBJ As Object

      Dim RetValLNG As Long

      Dim Xstr as String


      Private Sub UpdateSolidworks()


          Set PartOBJ = swApp.ActiveDoc

          ConfigNameSTR = "Default"

          Xstr = ".500"


          'Update the parameters in the part accordingly

          RetValLNG = PartOBJ.DeleteCustomInfo2(ConfigNameSTR, "Xdim")

          RetValLNG = PartOBJ.AddCustomInfo3(ConfigNameSTR, "Xdim", 30, Xstr)


      End Sub