[RobotStudio SDK] Freehand mode programatically
HM
✭
Hi,
I´m trying to write a function that simulate the Freehand controls of the interface. Here is a code snnipet that try to do this:
void Freehand(string objectName)
{
Station station = Project.ActiveProject as Station;
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.FreehandMode = FreehandMode.Move;
gc.Picker.FreehandReference = FreehandReference.FreehandReference.Local;
GraphicComponent s = null;
if (station.GraphicComponents.TryGetGraphicComponent(objectName, out s))
{
ProjectSelection ps = station.Selection;
ps.Clear();
ps.Add(s);
}
}
}
}
}
But, despite it selects the correct object, the reference coordinate system to move it doesn´t appear.
Any idea will be welcome.
HM
Post edited by Niklas Skoglund on
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings