CalcJointT & String Values

Does Anyone know how to use the “CalcJointT” where the rob target and tool data are listed in a string value? :cry:

VAR jointtarget jointpos;
VAR string pMyTopoint;
VAR string tMyTool;

jointpos := CalcJointT(pMyTopoint, tMyTool);

Something like this might work:

MODULE

Testa

PERS robtarget pTempPers:=[[0,0,0],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];

PERS tooldata tTempPers:=[FALSE,[[0,0,0],[1,0,0,0]],[0,[0,0,0],[1,0,0,0],0,0,0]];

PROC Testar()

VAR robtarget pTemp;

VAR tooldata tTemp;

VAR jointtarget jointpos;

VAR string pMyTopoint;

VAR string tMyTool;

!Get value by supplying the name through a string value

GetDataVal tMyTool, tTemp;

GetDataVal pMyTopoint, pTemp;

!CalcJointT needs persistent data

tTempPers := tTemp;

pTempPers := pTemp;

jointpos := CalcJointT(pTempPers,tTempPers);

ENDPROC

ENDMODULE