API 2006, selection problems

Discussion created by Guest on Oct 3, 2005
Hi Rasmus,

You can do this using the EModelViewControl::ComponentState API. Here's some sample VB code to toggle the selection state of a component :

Dim state As Boolean
state = EModelViewControl1.ComponentState(compname, eMVHighlight)
EModelViewControl1.ComponentState(compname, eMVHighlight) = Not state

where compname is of type String using the same convention as followed in the OnComponentSelectionNotify or OnComponentMouseOverNotify events. For example, the String would contain "MasterAssem1/Part1-1" and the like.

Hope this helps,
Vajrang.

Outcomes