RobotStudio event

Need help with RS-addin development on C#


Hello RS-Community 
I would like to retrieve the object properties (position, name ...) of a graphic object when clicked with the mouse pointer on it. Did it with the "GraphicPicker Class"attempts. But do not come on.


Philipp.Gastel2012-02-08 21:27:31

Comments


  • I found out there, this is the solution
    handler:
    GraphicPicker.GraphicPick + = newABB.Robotics.RobotStudio.Stations.Forms.GraphicPickEventHandler(OnSelection);

    argument:
    static void OnSelection (object sender, GraphicPickEventArgs e)
             {
                 Logger.AddMessage (new LogMessage (e.PickedObject.Name + " " + Convert.ToString (e.PickedPosition)));
             }


    Philipp.Gastel2012-02-08 21:27:03