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.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings