Hello all,
I found this script on here site.
But this can get only Instance name.
For example, I have 3 plates in a prodcut.
If that plate name is "Plate", instance name will be "Plate.1", "Plate.2", "Plate.3".
How can I modify this scrpt to get the "Part Number" not the "Instance name"?
I found this script on here site.
But this can get only Instance name.
For example, I have 3 plates in a prodcut.
If that plate name is "Plate", instance name will be "Plate.1", "Plate.2", "Plate.3".
How can I modify this scrpt to get the "Part Number" not the "Instance name"?
Code:
Language="VBSCRIPT"
Sub CATMain()
Set Document = CATIA.ActiveDocument
Set Selection = Document.Selection
MsgBox "Select Part, Product or Component"
ReDim InputObjectType(0) : InputObjectType(0)="Product"
Status=Selection.SelectElement2(InputObjectType,"Select Part, Product or Component",true)
if (Status = "Cancel") then Exit Sub
msgbox selection.item(1).value.name
End Sub