Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

How to Open and Export the Latest Drawing Version of a Part in CATIA with SmarTeam API

Eneess

Aerospace
Nov 17, 2024
2
Hello everyone,

I’m working with CATIA and SmarTeam and need help with a macro to open and export a part's latest drawing document as a PDF. Here is what I’m trying to accomplish:

  1. Goal: I have a specific part, and I need to locate its associated technical drawing in SmarTeam, retrieve the latest version of that drawing, and export it as a PDF. I know that ExportData in CATIA allows me to convert an open DrawingDocument into a PDF. The challenge, however, is in reliably accessing the drawing document associated with the part.
  2. Current Challenge: I can retrieve the part's ObjectID and ClassID through SmarTeam, but I am struggling with finding a way to navigate from the part to its associated drawing file. I’ve been searching for a function to retrieve the linked drawing directly but haven’t found a solution.
  3. Approach so far: I’ve tried using methods such as GetDocument and GetAssociatedDocuments (which don't appear to work as expected), and I'm unsure if I’m missing a step or if there is a specific SmarTeam API function better suited for this purpose.
If anyone has guidance on the correct approach to retrieve and open a part’s drawing in SmarTeam through the CATIA macro, I’d really appreciate it!
 
Replies continue below

Recommended for you

If I have to ask in a simpler way, can't we perform search operations in the smarteam database?
 

Part and Inventory Search

Sponsor