Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

identify part or product document

Status
Not open for further replies.

sri91

Mechanical
Joined
Aug 29, 2019
Messages
43
Location
IN
Hi All,
Can anyone please let me know vba code to identify part or product in cgr mode(the assembly is not in design mode)?
The below code will work if the product is only in design mode.

TypeName(mainProd.ReferenceProduct.Parent) = "PartDocument"


I dont want to open the assembly in design mode as it will take huge time to open big assemblies.

Any help in this regard is appreciated.

Thanks
SURYASRI
 
there is a step inbetween design-mode and cgr-mode:
Code:
oRootDoc.Product.ApplyWorkMode DEFAULT_MODE    'Required setting to retrieve Product properties (Definition) in visualization mode [/code ]

regards, 
LWolf
 
Thank you very much wolf. It is working. :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top