Hi all, I’m new to using Surpac and I’m currently learning how to work with macros.
Thanks to a bit of claude for design I came up with the nice exercice below of running chess pieces and I am now trying to move them apart. But I fell on this error and I don't know where it comes from, it seems unrelated to the macro though (Error code : 1000) ... Can anyone help me figuring out what is wrong in the current macro state? Thank you very much

Hi @GC which version of Surpac are you using to run this script? The error code 1000 is a generic error code which basically means that something in the software crashed but we're not sure what or why. Typically in this situation I would look to see which function was run which caused the crash and see if it can be reliably reproduced. I'll have a go with your script to see if I can reproduce on my side in the latest versions and come back to you.
I've run it quickly on the beta version of 2027 and the script completes. It strangely launches another instance of Surpac and I'm looking to see why that is happening. I imagine something to do with addressing addition namespaces but I'm not sure.
Thank you for checking, indeed changing a bit of the code shape fixed the two weird 2 instances bug. But still, I continue having this issue with error code 1000. Can you confirm you don't have it in the updated version below? If it's the case, it may be the old version of Surpac I am running currently
I've looked in to this in more detail and looked to simplify your script. There are a few things going on here which I think would be a bit painful in a real world scenario. It looks to me that you are modifying on a point by point basis the movement of the rook and the rotation of it. For 1000 points it's pretty quick but if it was larger you may want to move on a layer or string level rather than a point level.
There are also other ways of generating temporary graphical objects which may be more applicable depending on what your real world case would be. Either way have a go with the script below and let me know if it works for you.
Thank you very much this is exactly what I was aiming for, it works like a charm (also no more crashing issue which is nice)!