I didn't get my answer the first time, so I would like to ask again.
Is there a way to show and highlight all suppressed components from all levels in a TLA?
I know we can do 'select suppressed' from the drop down menu but it only shows the highlighted suppressed components from the TLA level. The suppressed components from sub-assemblies are also highlighted but the feature tree does not expend itself to show them. It does not make too much sense to me why the feature tree won't just make one step further to show all the highlighted components from the sub-assembly level, so what's the point of highlighting them?
Sometimes when there are multiple configurations and/or the model is not well-known, I think it's helpful to know what components are suppressed from what level. It is difficult the way it is now.
I hope there is a way to show all the suppressed items from feature tree (or a different window). Please help.
Thanks.
SolidworksApi macros
Hi Derek,
First, correct me if I'm wrong, but it seems like you're asking how to expand the feature tree to show all components, as opposed to simply selecting all suppressed components. It appears you already know how do the latter. You might edit the post title and contents to reflect that better.
As for the issue itself, you can expand the entire feature tree using the asterisk on your Numpad. The problem is that VBA SendKeys does not normally work with the numpad I don't think there's an easy way to incorporate this into a macro. Nor does it appear that any command exists within ISldWorks::RunCommand to expand the feature tree.
Nevertheless, if you're really determined, you can use the information found here in conjunction with IAdvancedSelectionCriteria, which will let you select suppressed components with the API.
Keith
SolidWorks API Tutorials
You can expand/collapse individual nodes using the TreeControlItem::Expanded. Take a look at this example: http://help.solidworks.com/2013/English/api/sldworksapi/expand_and_collapse_featuremanager_design_tree_nodes_vb.htm
Your macro needs to travesre a tree identify whether the component is suppressed and expand parent node.
____________________________________________________
Regards,
Artem Taturevych, Application Engineer at Intercad (Australia)
translationXpert – add-in to translate SolidWorks models
myIntercad – an integrated tool for SolidWorks Professionals
LinkedIn SolidWorks API Education Group
Cool, Artem. I didn't know about ITreeControlItem::Expanded. Unfortunate that there's no member for accessing ITreeControlItem through IAssemblyDoc or IComponent2.
Derek, by the way, if you're only goal is to see the names of the components, you could display their names using a smart message (IModelDocExtension::ShowSmartMessage). You could use ISelectionMgr::GetSelectedObject6 to get all of the selected items, then use IComponent2::Name to get their names, then add to the smart message string.
Keith
SolidWorks API Tutorials
Yes, it is only one way association. You can traverse the tree as the ITreeControlItem and do expand/collapse and get IFeature or IComponent2 from ITreeControlItem. But you cannot get the ITreeControlItem from IFeature or IComponent2.
Hi Keith and Artem,
Thanks a lot for your help. Learned a lot.
Keith,
You understood my problem right mostly. It's about expand the tree. However, instead of expanding every single sub-assemblies it would helpful if I do advanced select on suppressed compnents only the sub-assemlies with the suppressed components in it will open up.
Maybe I ask too much, but I just think if the advanced selection highlights all the components why not just go one more step and show them.
I am not a experienced user (only two months with the tool) so I don't understand how to do macro at all. But good to know.
Thanks.