AnsweredAssumed Answered

Deleting and replacing Specific Properties in Custom Properties

Question asked by Unspecified Unspecified on Jun 24, 2019
Latest reply on Jun 24, 2019 by Fifi Riri

HI

 

I am having difficulty deleting and replacing properties in solid works custom properties using a Macro. Which I have shown below.  I do not have much experience with macros and have been going round in circles.

 

Set Part = swApp.ActiveDoc

Dim MyProp(1, 9) As String

'Property names
MyProp(0, 0) = "RowA"
MyProp(0, 1) = "Revision"
MyProp(0, 2) = "RowB"
MyProp(0, 3) = "RowC"
MyProp(0, 4) = "RowADes"
MyProp(0, 5) = "RowBDes"
MyProp(0, 6) = "RowCDes"
MyProp(0, 7) = "RowAECN"
MyProp(0, 8) = "RowBECN"
MyProp(0, 9) = "RowCECN"

'Property values

MyProp(1, 0) = "A"
MyProp(1, 1) = "A"
MyProp(1, 4) = "FIRST PDM RELEASE"
MyProp(1, 7) = "OC-001992-CN"

 

Dim m As Integer

For m = 0 To 9
retval = Part.AddCustomInfo3("", MyProp(0, m), 30, _
MyProp(1, m))
Next m

End Sub

 

I would like to clear the values from 0 to 9 and then populate 0, 1, 4 and 7 with the information shown.  Any help would be greatly appreciated.

Outcomes