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: 

Replace single occurrence of multiple instances

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

Replace single occurrence of multiple instances

Hey Guys, need a little guidance with this one. I have a door with 3 of the same handle. I have a program in which the user selects 1 of the handles to turn it into a keyed handle. Now, this all works but the problem is that all of the 3 regular handle instances will be replaced with the keyed handle. Is there a way to prevent this?

 

Dim oOccHandle As ComponentOccurrence = oINV.CommandManager.Pick(SelectionFilterEnum.kAssemblyOccurrenceFilter, "Select a door handle to replace.")
oOccHandle.ReferencedDocumentDescriptor.ReferencedFileDescriptor.ReplaceReference(PathToKeyedHandleModel)

 

 

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

bah, i should really do more homework before posting a rookie question

 

For the reference of anyone else, I just needed to do oOccHandle.Replace(pathToNewModel, False)

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