RobotStudio event

rapid data value for tool data



hi,everyone

I create an object representing the RAPID data value, and I want to read the Tool Data
,like the following simple code.

I got the rapid data through the following path
RapidData rd = aController.Rapid.GetRapidData("T_ROB1", "user", "reg1");

Then I create a ToolData
ToolData aTool;

Here it compared the tool data type with rd point to the value. 
if (rd.Value is ToolData)
{
    aTool = (ToolData) rd.Value;
}

here it's important for me to read the Robot of translation
this.label1.Text = aTool.Tframe.Trans.ToString();

the one question is how I know that I got the RAPID data value correspond to the tool data type
If it's the wrong way to read the rapid data value, I nedd your help 




weisheng2011-11-22 16:47:15

Comments

  • I have the same problem too ,  can anyone solve this problem?
  • All right,  it's solved 
    RapidData rd = aController.Rapid.GetRapidData("T_ROB1", "user", "reg1"); 
    it's the path for the program data 
    now I got it
  • dear friend 

    can you give example which is solved?