FullPath of Selected Product / Part in an Assembly
FullPath of Selected Product / Part in an Assembly
(OP)
Hi there,
I am trying to get the fullpath of selected product/part in an catia assembly. Below is the code i am trying for.
Sub CATMain()
Dim oSelection As Selection
Dim theComponent As Product
Set oSelection = CATIA.ActiveDocument.Selection
Set theComponent = oSelection.Item2(1).Value
msgbox(theComponent.Name) -> Instance name here
msgbox(theComponent.FullName) -> here is the error
End Sub
I am able to get product/part Name and instance name but not the fullpath ("D:\CATIA\...\.CATPart")
Thanks in advance.
I am trying to get the fullpath of selected product/part in an catia assembly. Below is the code i am trying for.
Sub CATMain()
Dim oSelection As Selection
Dim theComponent As Product
Set oSelection = CATIA.ActiveDocument.Selection
Set theComponent = oSelection.Item2(1).Value
msgbox(theComponent.Name) -> Instance name here
msgbox(theComponent.FullName) -> here is the error
End Sub
I am able to get product/part Name and instance name but not the fullpath ("D:\CATIA\...\.CATPart")
Thanks in advance.





RE: FullPath of Selected Product / Part in an Assembly
generally, I use a vb editor to find the part's/product's expressions and correct references :)
regards,
LWolf