Quantcast
Channel: NX Journaling - Journaling / NXOpen API
Viewing all articles
Browse latest Browse all 783

Highlighting or Selecting Components in Assembly Navigator

$
0
0

I am struggling with a selection routine to run through a displayed assembly and select all left hand components (using our naming convention). The intent is to pre-select components inside the Assembly Navigator to then run the Mirror Assembly command. Mirror Assembly will accept pre-selection (essentially completing the first step in the dialog) and is not a journal recordable command.

In reference to the below code, .highlight only highlights the component in the display area and faintly highlights the component in the Assembly Navigator. On exiting the UI the highlighting stays and the faint selection goes away.

I've tried variations of both .Selection and theUI.SelectionManager methods without luck.

ForEach cmp As Component In theSession.Parts.Display.ComponentAssembly.RootComponent.GetChildrenDim isMirror AsBoolean= cmp.Name.Substring(8, 1).ToLower="l"If isMirror Then
                            cmp.Highlight()EndIfNext cmp

Viewing all articles
Browse latest Browse all 783

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>