AnsweredAssumed Answered

How to change custom Value in the summary information?

Question asked by Yong Ning on Feb 2, 2012
Latest reply on Feb 4, 2012 by Filipe Venceslau

I use follow code, Creat custom information.

Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim value As String

Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc

 

swModel.AddCustomInfo3 "", "MyProp3", swCustomInfoNumber, "3"
swModel.AddCustomInfo3 "", "MyProp4", swCustomInfoNumber, "4"


Dim retval() As String
Dim i As Integer

retval = swModel.GetCustomInfoNames2("")
For i = 0 To UBound(retval)
swApp.SendMsgToUser2 retval(i), 0, 0
Next

Dim count As Long
count = swModel.GetCustomInfoCount2("")
'swApp.SendMsgToUser2 "You have " & count & " custom properties.", 0, 0
swApp.SendMsgToUser2 _
"You have " & count & " custom properties.", 0, 0
End Sub

 

 

Result see Graph

0.JPG

Target demand:

How to change Custom value

e.g. value/text expression 3 change 10

e.g. value/text expression 4 change 11

 

Thanks very much.

Outcomes