AnsweredAssumed Answered

Update custom property value using same macro

Question asked by Pichaiyan Prabaharan on Jun 6, 2017
Latest reply on Jun 7, 2017 by Pichaiyan Prabaharan

I created simple macro to input Custom property value, but once i triggered that macro i can't use that same filed to update the values.

For Example If i give the Quantity value as 800 there after i can't update that value using the same macro with different value.


Sub main()

Dim swApp As SldWorks.SldWorks

Dim swModel As SldWorks.ModelDoc2

Dim swCustPropMgr As SldWorks.CustomPropertyManager

Set swApp = Application.SldWorks

Set swModel = swApp.ActiveDoc

Set swCustPropMgr = swModel.Extension.CustomPropertyManager(Empty)


swCustPropMgr.Add2 "Quantity", swCustomInfoNumber, "800"



End Sub


Is there any option available to do that?