Inventor Customization

Inventor Customization

Reply
Valued Contributor
andrewwhiteinc
Posts: 59
Registered: ‎02-02-2011
Message 1 of 2 (134 Views)
Accepted Solution

Replace single occurrence of multiple instances

134 Views, 1 Replies
12-20-2012 09:36 AM

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,EIT
Engineer-in-Training, Industrial Automation
Valued Contributor
andrewwhiteinc
Posts: 59
Registered: ‎02-02-2011
Message 2 of 2 (131 Views)

Re: Replace single occurrence of multiple instances

12-20-2012 09:40 AM in reply to: andrewwhiteinc

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,EIT
Engineer-in-Training, Industrial Automation
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.