Select all occurrences of component

Select all occurrences of component

Anonymous
Not applicable
295 Views
1 Reply
Message 1 of 2

Select all occurrences of component

Anonymous
Not applicable
Take any assembly (or weldment), which could conceivably contain other assemblies/weldments. I need a fast way to select every occurrence of a given filename. I currently have a recursive sub that looks through the entire tree structure at every ComponentOccurrence whose .Definition.Document.FullFileName property is the one I'm looking for, and although it does work, I'm sure it's going to take way too long on larger assemblies. I was just looking at the AllLeafOccurrences property, but the help isn't too clear on that one, so I'm not sure if that's what I need. -------------------------------------------------------------------------------- Brian R. Iwaskewycz Senior Mechanical Engineer PA Transformer Technology, Inc.
0 Likes
296 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
I think you want to look into the ItemByName property that is new to R8. -- Kent Autodesk Discussion Group Facilitator "Brian Iwaskewycz" wrote in message news:4048de47_3@newsprd01... Take any assembly (or weldment), which could conceivably contain other assemblies/weldments. I need a fast way to select every occurrence of a given filename. I currently have a recursive sub that looks through the entire tree structure at every ComponentOccurrence whose .Definition.Document.FullFileName property is the one I'm looking for, and although it does work, I'm sure it's going to take way too long on larger assemblies. I was just looking at the AllLeafOccurrences property, but the help isn't too clear on that one, so I'm not sure if that's what I need. -------------------------------------------------------------------------------- Brian R. Iwaskewycz Senior Mechanical Engineer PA Transformer Technology, Inc.
0 Likes