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
- 401 UpFeed
- 21 Tutorials
- 16 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 366 IRC5
- 86 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 856 RAPID Programming
- 40 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings