Can somebody please help me modify this code which adds 3 new Parameters to a part to work at the assembly level and adds these parameters to every part and product?
Code:
Language="VBSCRIPT"
Sub CATMain()
Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument
Dim product1 As CATBaseDispatch
Set product1 = partDocument1.GetItem("")
Dim parameters1 As Parameters
Set parameters1 = product1.UserRefProperties
Dim strParam1 As StrParam
Set strParam1 = parameters1.CreateString("DETAIL NUMBER", "")
strParam1.ValuateFromString ""
Dim parameters2 As Parameters
Set parameters2 = product1.UserRefProperties
Dim strParam2 As StrParam
Set strParam2 = parameters2.CreateString("MATERIAL", "")
strParam2.ValuateFromString ""
Dim parameters3 As Parameters
Set parameters3 = product1.UserRefProperties
Dim strParam3 As StrParam
Set strParam3 = parameters3.CreateString("STOCK SIZE", "")
strParam3.ValuateFromString ""
End Sub