Message 1 of 4
How to search for a component in an assembly with a keyword using ilogic

Not applicable
04-04-2017
12:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an assembly which has a lot of subassemblies.
There are components with first part of the name as thier part family name.
I will be asking to replace components or suppressing based on some value.
My problem is to replce or suppress the specific component.
I was using
ThisDoc.Document.ComponentDefinition.Occurrences.Item(#).Name
to find the component and do the process. Now it has come to my notice that the occurence number changes during the time and the operation replaces or suppresses other components with ethe occurence number. Not sure why the occurence number changes.
Could someone help me witha code snippet to search the component using a keyword that will be first word of the component name.