![RobotStudio event](https://new.abb.com/images/librariesprovider89/default-album/robotstudio-webinar-arc-welding.jpg)
[RobotStudio SDK] Freehand mode programatically
![HM](https://secure.gravatar.com/avatar/d83e11f7ed8f8eb45698546646519c7e/?default=https%3A%2F%2Fus.v-cdn.net%2F5020483%2Fuploads%2Fdefaultavatar%2FK2266OAKOLNC.jpg&rating=g&size=200)
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
- 397 UpFeed
- 18 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 319 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 804 RAPID Programming
- 4 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings