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.4K RobotStudio
- 384 UpFeed
- 14 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 247 ScreenMaker
- 2.7K Robot Controller
- 279 IRC5
- 46 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 734 RAPID Programming
- 15 Wizard Easy Programming
- 105 Collaborative Robots
- 3 Job listings