Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

FullPath of Selected Product / Part in an Assembly 1

Status
Not open for further replies.

GopinadhGvs

Mechanical
Mar 30, 2015
4
IN
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.
 
Replies continue below

Recommended for you

try MsgBox (theComponent.ReferenceProduct.Parent.FullName)
generally, I use a vb editor to find the part's/product's expressions and correct references :)

regards,
LWolf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top