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:
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:
- 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.
- 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.
- 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.