RobotStudio event

API: Transform relative to UCS

Hello

I want to apply a transformation on an object in my scene with reference to the UCS.
I can set the UCS in the station, but how can i tell robotstudio to use this coordinatesystem for the transformation?

Best Regards, Matthias

Comments

  • Hi Matthias,

    To set the transform of an object relative to UCS you should do something like this:

    [code]
    Station stn = Project.ActiveProject as Station;
    IHasTransform object = ...
    Matrix4 relativeTransform = ...
    object.Transform.GlobalMatrix = stn.UCS.GlobalMatrix * relativeTransform;
    [/code]

    regards,
    Johannes

    Johannes Weiman
    Software Engineer
    ABB Robotics