Replace single occurrence of multiple instances

Replace single occurrence of multiple instances

Anonymous
Not applicable
446 Views
1 Reply
Message 1 of 2

Replace single occurrence of multiple instances

Anonymous
Not applicable

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)

 

 

0 Likes
Accepted solutions (1)
447 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

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)

0 Likes