Code Red => AutoLISP (Vanilla / Visual) => Topic started by: DanB on February 18, 2022, 09:43:31 AM
Title: Rotate Reference
Post by: DanB on February 18, 2022, 09:43:31 AM
I've tried various osnap presets and I can't seem to prevent the command from "jumping" to an inaccurate location. I get very mixed results with the basepoint and/or the reference points. I've attached a GIF showing the basepoint "jumping" to a unwanted location. Any suggestions?
Ideally I would want the basepoint selection to be CENTER osnap, then reference points are both ENDPOINTS, always defaulting back to my original OSNAP settings.
Title: Re: Rotate Reference
Post by: ribarm on February 18, 2022, 09:59:07 AM
2. I do not understand the addition of "_non" in this line: (command "_.ROTATE" ss1 "" "_non" pnt1 "_R" "_non" pnt1 "_non" pnt2 "\\")
My post here (https://stackoverflow.com/a/57258370/7531598) should hopefully help to answer this, and also provide you with some alternative methods to achieve the same thing.
Title: Re: Rotate Reference
Post by: Lee Mac on February 20, 2022, 07:42:44 AM
Where the use of initget is concerned, whilst this prevents the user from dismissing the prompt (thereby forcing the user to either supply a valid input or cancel the program by pressing Esc), I personally prefer to allow the user to exit the program cleanly by dismissing the prompt, and use a conditional statement (if/cond) to branch the evaluation of the program accordingly, based on the input provided, e.g.: