Example to rotate selected?
Posted: Sat Sep 16, 2023 1:18 pm
Hello all, first time poster here, and new user of QCAD, which really is a spectacular value / piece of software. I am a longtime Vectorworks user, but I don't use it enough to justify licensing it any more. I scripted in that program a lot and out of sheer muscle memory, I'm looking to script some of the more "convenient" tools I liked from that program. ...many of which required a 'handle to the selected object'
I've done due diligence for about 45 mins now, searching/browsing the API docs and simply can't figure out how (using QCAD simple API) to "get a handle to a selected object", i.e the "entity"....the 'e' argument... so that I can rotate it 90º with a keystroke. I've killed enough time now to execute the RO command manually about 500 times
and rapidly approaching a negative return on investment time wise. Of course the learning is worth it.
Would anyhow happen to have, or know where I might find perhaps...and example of the correct ECMAScript syntax to acquire a handle to the selected object for modification with the simple API?
The goal here is to rotate selected entity[s] (bounding box if multiple selection) by 90º to the right or left (CCW/CW) using ALT-L and ALT-R (or some other modification key). In either case, I'd rotate around the bounding box center of the entity[s])
I'll keep searching, but a nudge in the right dirction would be appreciated. Thx!
TomK
I've done due diligence for about 45 mins now, searching/browsing the API docs and simply can't figure out how (using QCAD simple API) to "get a handle to a selected object", i.e the "entity"....the 'e' argument... so that I can rotate it 90º with a keystroke. I've killed enough time now to execute the RO command manually about 500 times

Would anyhow happen to have, or know where I might find perhaps...and example of the correct ECMAScript syntax to acquire a handle to the selected object for modification with the simple API?
The goal here is to rotate selected entity[s] (bounding box if multiple selection) by 90º to the right or left (CCW/CW) using ALT-L and ALT-R (or some other modification key). In either case, I'd rotate around the bounding box center of the entity[s])
I'll keep searching, but a nudge in the right dirction would be appreciated. Thx!
TomK