Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What I refer to is when you create a pattern of virtual component or copy and paste a virtual component.
Comparing the ComponentDefinition property of the occurrences seems to work (check the code below), is there something more specific inside VirtualComponentDefinition object that I can check?
Dim oSS As SelectSet oSS = ThisApplication.ActiveDocument.SelectSet Dim occ1 As ComponentOccurrence = oSS.Item(1) Dim occ2 As ComponentOccurrence = oSS.Item(2) Dim cmpDef1 As VirtualComponentDefinition = occ1.Definition Dim cmpDef2 As VirtualComponentDefinition = occ2.Definition Logger.Info((cmpDef1 Is cmpDef2).ToString())
Checking the name not a good idea because it can change per occurrence.
Checking the part number or something like that not ok because I could have set the same part number for occurrences of different virtual components.
Solved! Go to Solution.