Hello,
I’ve been working with a c# add-in that defines robot targets using a 3rd party tool. My current method involves identifying all the robotTargets present in a task using SearchRapidSymbol and then writing to the RapidData.value field of those symbols using FillFromString2. However, if I understood it correctly this method’s result is similiar to debugging a c# program and using the debugger to pause and during run-time inject new values to variables, meaning that the actual code is never changed. Every time the program pointer is reset the RobotTargets are reverted back to their old values since the actual RAPID code never changed. So what I would need to do is change the actual decleration line of the RobotTarget in the RAPID module.
Is there any way to edit rapid modules / lines in rapid modules using the RS / PC SDK directly? Or is my best bet copying the modules from the controller to local memory, editing them with a stream reader/ writer and then loading them back into the controller? This is of course possible to do it’s just that I would prefer to not have to take this route. I have been looking through the API but I couldn’t find anything that seemed promising.