Hi,
I found a macro to create custom properties in a SW file. I have modified the original to suit our needs, it works well except for the fact that it writes the custom properties to the custom tab. Instead I would like to write the same custom properties but to all configuration tabs.
Can anyone help please?
Public swApp As Object
Public Part As Object
Sub main()
Set swApp = CreateObject("SldWorks.Application")
Set Part = swApp.ActiveDoc
Dim MyProp(1, 3) As String
'Property names
MyProp(0, 0) = "Material"
MyProp(0, 1) = "Weight"
MyProp(0, 2) = "SurfaceArea"
MyProp(0, 3) = "Volume"
'Property values
MyProp(1, 0) = Chr(34) & "SW-Material" & Chr(34)
MyProp(1, 1) = Chr(34) & "SW-Mass" & Chr(34)
MyProp(1, 2) = Chr(34) & "SW-SurfaceArea" & Chr(34)
MyProp(1, 3) = Chr(34) & "SW-Volume" & Chr(34)
Dim m As Integer
For m = 0 To 3
retval = Part.AddCustomInfo3("", MyProp(0, m), 30, _
MyProp(1, m))
Next m
End Sub
When you put information in the Configurations Tab you can't update any Custom Properties using the Task Scheduler..
Do you know about the Custom Property Tab Builder?? Not sure why you would need a macro to insert the custom properties that you show above, those can be automatically filled out in your templates, no need to run a macro for Mass Density or Weight??/