cancel
Showing results for 
Search instead for 
Did you mean: 

Absolute location of ITxRoboticLocationOperation

Creator
Creator

Hey,

 

I want to get the absolute location (X,Y,Z values) of a location of type ITxRoboticLocationOperation. I can't figure out how to get these because there is no attribute like "absoluteLocation" as it is for example with TxRobot.

 

Hope someone can help,

 

Best Regards,

Felix

2 REPLIES

Re: Absolute location of ITxRoboticLocationOperation

Siemens Genius Siemens Genius
Siemens Genius

You need to cast the location to an ITxLocatableObject interface.

Example:

TxVector GetLocationPosition(ITxRoboticLocationOperation loc)
{
   TxVector xyz= null;
   ITxLocatableObject locatableObj = loc as ITxLocatableObject;
   if (locatableObj != null)
   {
       TxVector position = locatableObj.AbsoluteLocation.Translation;
   }
   
   return xyz;
}

Re: Absolute location of ITxRoboticLocationOperation

Creator
Creator

Thanks, it works!