Custom Properties API -"AddCustomInfo3"
Custom Properties API -"AddCustomInfo3"
(OP)
I am trying to modify an API that adds custom property data to
parts. I use :-
For m = 0 To 3
retval = Part.AddCustomInfo3("", MyProp(0, m), 30, MyProp(1, m))
Next m
Which works if the custom property did not previously exist. What do I have to do overwrite an existing value?
parts. I use :-
For m = 0 To 3
retval = Part.AddCustomInfo3("", MyProp(0, m), 30, MyProp(1, m))
Next m
Which works if the custom property did not previously exist. What do I have to do overwrite an existing value?






RE: Custom Properties API -"AddCustomInfo3"
strNumber = Part.CustomInfo2("", "Number")
throw this into a form field if you like. Then delete the old property:
retval = Part.DeleteCustomInfo2("", "Number")
The create the property again:
retval = Part.AddCustomInfo3("", "Number", swCustomInfoText, txt_number.Text)
Jason
RE: Custom Properties API -"AddCustomInfo3"
Usually what I do is write a subroutine to first check for the property, then add or change (using "ModelDoc2::CustomInfo2") as needed. It's also OK to double-up, add first and and then overwrite.
http://www.EsoxRepublic.com-SolidWorks API VB programming help