Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting iproperties values of all sub part or asm of the active IAM document?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
mucip
292 Views, 1 Reply

Getting iproperties values of all sub part or asm of the active IAM document?

Hi,

Normally I can get, add and change all the iproperties values below code:

 

Dim invDocs As Documents
        invDocs = inv_App.Documents
        Dim i As Integer
        Dim invDocument As Document

        Dim invPartNumberProperty As Property
        For i = 1 To invDocs.Count
            invDocument = invDocs.Item(i)

            Set invPartNumberProperty = invDocument.PropertySets.Item("Design Tracking Properties").Item("Part Number")
        Next

But above code give the all part/asm part list of the all open files in inventor 2013...

 

I want to get used part/assembly list of only active document. But inv_App.ActiveDocument has not got "For i = 1 To invDocs.Count" propety?!...

 

How can I iterate and get iproperties values of only active document of the inventor session?...

 

Regards,

Mucip:)

1 REPLY 1
Message 2 of 2
mucip
in reply to: mucip

Hi,

I found solution... 🙂

 

Dim invDocs As Document
        invDocs = inv_App.ActiveDocument       
        'Get all of the referenced documents.
        Dim oRefDocs As DocumentsEnumerator
        oRefDocs = invDocs.AllReferencedDocuments

        Dim invPartNumberProperty As Property

    
        Dim invDocument As Document
    
        For Each invDocument In oRefDocs    
            ' Get a specific item from the Documents collection.

       Set invPartNumberProperty = doc.PropertySets.Item("Design Tracking Properties").Item("Part Number")     

            MsgBox(invPartNumberProperty.value)
        
        Next

 

Regards,

Mucip:)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report