Select viewport
Olga87 19 Mar 2024
Hello Dear NanoCAD specialists!
There is a code (lisp):
(setq vpt (LM:ssget "\nSelect viewport: " '("_:S" ((0 . "VIEWPORT")))))
(defun LM:ssget ( msg arg / sel )
(princ msg)
(setvar 'nomutt 1)
(setq sel (vl-catch-all-apply 'ssget arg))
(setvar 'nomutt 0)
(if (not (vl-catch-all-error-p sel)) sel)
)
How to change so that a viewport created from a Circle object cannot be selected?
There is a code (lisp):
(setq vpt (LM:ssget "\nSelect viewport: " '("_:S" ((0 . "VIEWPORT")))))
(defun LM:ssget ( msg arg / sel )
(princ msg)
(setvar 'nomutt 1)
(setq sel (vl-catch-all-apply 'ssget arg))
(setvar 'nomutt 0)
(if (not (vl-catch-all-error-p sel)) sel)
)
How to change so that a viewport created from a Circle object cannot be selected?
Olga87 20 Mar 2024
That's how it seems to work:
; Checking what kind of object it is (if circle is the exit)
(cond
(
(if (= (cdr (assoc 0 (setq get (entget ent)))) "CIRCLE")
(progn
(alert "CIRCLE")
(t nil)
)
)
)
)
; Checking what kind of object it is (if circle is the exit)
(cond
(
(if (= (cdr (assoc 0 (setq get (entget ent)))) "CIRCLE")
(progn
(alert "CIRCLE")
(t nil)
)
)
)
)