Angelo2449
Guest
Hello everyone,
I observed that there is a difference between a closed polyline manually drawn and a rectangle drawn with the appropriate command.
the following code;
produces the list of tops of the selected polylinea.
in case, for example, it is a rectangle, if this has been tracked with a polyline, the cont variable will be equal to 5 (5 clicks of the mouse) while if tracked with the command "_rectangle" the cont variable will be equal to 4.
This makes it impossible to distinguish the two forms by selection.
Does anyone have an idea?
Thank you.
I observed that there is a difference between a closed polyline manually drawn and a rectangle drawn with the appropriate command.
the following code;
Code:
(defun cdrs (key lst / pair rtn primo cx cy)
(setq stringaout ")
(setq cont 0)
(while (setq pair (assoc key lst))
(setq rtn (cons (cdr pair) rtn) lst (cdr (member pair lst)))
(first setq (car rtn))
(setq cont (1+ cont))
(setq cx (car first))
(setq cy (cadr primo))
(setq stringout (strcat stringout (rtos cx 2 3) "," (rtos cy 2 3) "#")
);;while
);;fun fine cdrs
---------------------------------------------
..............................................................................
(setq entita (entsel "\nseleziona l'oggetto da dimensionare (tasto destro del mouse per surface area))))
(setq vertici (cdrs 10 (entget (car entita))))
in case, for example, it is a rectangle, if this has been tracked with a polyline, the cont variable will be equal to 5 (5 clicks of the mouse) while if tracked with the command "_rectangle" the cont variable will be equal to 4.
This makes it impossible to distinguish the two forms by selection.
Does anyone have an idea?
Thank you.