VC# sample code request

Hi,
From Visual C#, not VSTA, how can I get to the selection modes in order to set a particular level when a certain event happens. i.e. Clicking in a text window will set the selection level to 'part' or 'surface', etc.
Thanks
Comments
-
Hi
You could do something like thispublic static void SetSelectionMode(SelectionModes mode)
{
foreach (Window w in UIEnvironment.Windows)
{
if ((w is DocumentWindow) && w.Control is GraphicControl)
{
GraphicControl gc = w.Control as GraphicControl;
if (gc != null)
gc.Picker.SelectionMode = mode;
}
}
}
and then just call it with the selectionmode you want for example
SetSelectionMode(SelectionModes.Curve);
You need to add some namespaces as well at least
using ABB.Robotics.RobotStudio.Stations.Forms;
using ABB.Robotics.RobotStudio.Environment;Per Svensson
Robotics and Vision Specialist
Consat Engineering0 -
THanks
0
Categories
- All Categories
- 5.6K RobotStudio
- 398 UpFeed
- 20 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 327 IRC5
- 65 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 820 RAPID Programming
- 8 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings