Change workobject in RAPID

Hey there,
i need some help for a function that enables the user to change an existing workobject. Something that uses UIListView in which existing workobject are listed and can be chosen. Then:

[code for GUI that gets new points X1 Y1 and Y2 from user]
temp_frame := DefFrame (X1, X2, Y1 origin:=3);
chosenworkobject.uframe:=temp_frame;

In C++ i would use a pointer or something like that to change the existing workobject.

Anyone has a idea how to accomplish that in RAPID?

Many thanks,
Michael

How about a “_currentWorkObject”, that you work with in the succeding instructions? I am doing something similar ( using a “virtual” wokobject as the one the instructions are executed in )

I just grabbed something similar from my code - just rotating the oframe using quaterion multiplication…

PROC PivotwobjProgram(orient PivotQuaternion)
wobjProgram := wobjProgramOrig;
wobjProgram.oframe.rot := wobjProgramOrig.oframe.rot * PivotQuaternion;
ENDPROC