Get ipt part number in an idw file

Get ipt part number in an idw file

Anonymous
Not applicable
783 Views
4 Replies
Message 1 of 5

Get ipt part number in an idw file

Anonymous
Not applicable

Hello everyone,

 

I'm trying to make a macro to export my idw files into pdf. I manage to do what I want ... till now.

My problem is that I have some idw files with several sheets and for some of those files the second sheet is not a drawing of the same part as in the first sheet. (For example, sheet n°1 is for part n°93312A and sheet n°2 is for n°93312X)

 

So I need to check the part number of the 3D model main view for each sheet to know if it is a second pages of my pdf or if it's another pdf.

How can I get the Iproperties of an ipt from an idw?

 

Thanks,

 

Yannick

 

 

 

0 Likes
Accepted solutions (1)
784 Views
4 Replies
Replies (4)
Message 2 of 5

JaneFan
Autodesk
Autodesk

Hi Yannick,

 

Please check the name of referenced document property of the any one of the drawing view in the sheet as you need.

Here is the way to get the property:

ThisApplication.ActiveDocument.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.DisplayName
ThisApplication.ActiveDocument.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.FullDocumentName

 

 




Jane Fan
Inventor/Fusion QA Engineer
0 Likes
Message 3 of 5

Anonymous
Not applicable

Hello, thanks for your answer, it's a beginning of solution for me.

 

Do you know how to get only the "part number" of the 3D model? (As the titleblock do when you place the first view of a drawing)

0 Likes
Message 4 of 5

waynehelley
Collaborator
Collaborator
Accepted solution

Try this...

 

ThisApplication.ActiveDocument.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.ReferencedDocument.PropertySets.Item("Design Tracking Properties").Item("Part Number").Value

 

Wayne Helley
Inventor 2013 Certified Professional

Autodesk Inventor Professional 2023
Visual Studio 2022
Windows 10 Pro, 64-bit
0 Likes
Message 5 of 5

Anonymous
Not applicable

It's what I need and it's working. 🙂

 

I just changed Sheets(1) with Activesheet to have the number for each sheets.

 

Thank you very much Wayne

0 Likes