TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: amc.dicsac on December 30, 2016, 11:59:16 AM
-
Hi how is it going
I am looking forward to this with ssget:
Select objects to add or [option1 / option2]: <option1>
But as can not be done with ssget I want to do with grread I do not know if someone could give me an idea, thanks
-
But as can not be done with ssget I want to do with grread I do not know if someone could give me an idea, thanks
https://www.theswamp.org/index.php?topic=34804.0
-
Simpliest I could think of:
(defun C:test ( / SS1 SS2 p1 p2 )
(while
(and
(or (setq SS1 (ssget "_I")) T)
(not (initget "A B C D"))
(setq p1 (getpoint "\nSelect objects or [A/B/C/D] <exit>: "))
)
(cond
((vl-consp p1)
(not (initget "A B C D"))
(setq p2 (getcorner p1 "\nSelect objects or [A/B/C/D] <exit>: "))
(cond
((vl-consp p2)
(setq SS2 (ssget "_C" p1 p2))
(sssetfirst nil (acet-ss-union (list SS1 SS2)))
)
((= 'STR (type p2))
(alert (strcat "\nOption \"" p2 "\" was chosen."))
)
); cond
)
((= 'STR (type p1))
(alert (strcat "\nOption \"" p1 "\" was chosen."))
)
); cond
); while
); defun
Must include DEselect Option.