This is an interesting issue. I figured the feature tree filter would surely parse through component references - it does so for tags. But that does not seem to be the case. Nor could I find a workable method with Advanced Selection or Assembly Visualization.
One approach (not optimal) is to insert a BOM table into the assembly and add a column for Component Reference. You can then sort on that column. Clicking the row of the reference you want will highlight the component.
Thanks for looking Daen,
My goal is to sort my Assembly tree into folders, that I then use to set display states.
Specifically, I have an Assembly I create from Circuit Works, I import the Annotations for Ref Des, that SolidWorks populates to the Component References property. This is appropriate, as the Component References only relate to the placement in the Assembly, and not the properties of the individual part as it stands alone.
After that, I have hundreds of components that I put in two folders. One for Connectors (Ref Des starts with "J") All other components in the other. So the point I'm trying to make is that with an Advanced Selection of items containing "J" in the Component Reference property, I can quickly do a select and Move to New Folder without having to manually pick them all out.
I then use those folders to quickly create display states, mainly for assembly graphics performance. One for All Components, One for Connectors view able only, others hidden, One for Board Only....
I also do something along the lines of what your talking about in the drawing. I use the display state i create to show the Connectors Only on a reference Drawing, and then remove the quantity field so that I can list duplicate connectors as different instances. The way I do so I documented here: Ungrouping QTY Items in a BOM
As Daen Hendrickson mentioned, I'm sure that a macro be made which can do following tasks.
- Creates the required folder in assembly (if not present)
- Select the component with either specified Component Reference OR same Component Reference
- Move them to respective folder.
I like that approach Deepak. I haven't found the API's yet. I've been doing a lot with macros over the past year or two on my own. I'll have to look though what I have and see if there is some samples I can pull together, that will run through the tree.
I found this:
2. But I still can't find an API to select per Component Reference Property.
Using swComponent.ComponentReference, that value can be extracted and loop thru the if condition. If condition is true then select the file and add to selection (for moving them all to the folder) OR better move to folder (one by one) on selection (this would work better I guess as sometimes multi selection for moving to a folder doesn't work)
I can definitely see the usefulness of your process. I suspect searching out and manually adding a custom property or tag is not a viable workflow.
Perhaps Deepak Gupta knows of a macro that will copy component references into a component tag. Then you could use the Feature Tree Filter to search.