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: 

Add Currently Selected Parts to an ObjectCollection

1 REPLY 1
SOLVED
Reply
Message 1 of 2
andrewwhiteinc
352 Views, 1 Reply

Add Currently Selected Parts to an ObjectCollection

Hey Guys, I thought this might have been straight forward but I'm having a bit of trouble. I want the user to have a set of occurrences selected and click a button to run code on them but I can't seem to find a method of getting the names or anything else on the actively selected parts. Any direction on this would be appreciated plz.

 

Cheers!

P. Andrew White, P.Eng
Manufacturing Engineering Manager
Silent-Aire Manufacturing
1 REPLY 1
Message 2 of 2

As it was straight forward. For future reference of anyone searching here it is:

 

        Dim oDoc As AssemblyDocument
        Dim oCol As New Collection
        oDoc = oINV.ActiveDocument
        For i = 1 To oDoc.SelectSet.Count
            oCol.Add(oDoc.SelectSet.Item(i))
        Next
        For Each part In oCol
            oINV.Documents.Open(part.ReferencedDocumentDescriptor.ReferencedFileDescriptor.FullFileName, True)
        Next 

P. Andrew White, P.Eng
Manufacturing Engineering Manager
Silent-Aire Manufacturing

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

Post to forums  

Autodesk Design & Make Report