SSGET Selection area color

SSGET Selection area color

neam
Collaborator Collaborator
337 Views
2 Replies
Message 1 of 3

SSGET Selection area color

neam
Collaborator
Collaborator

Hi everyone

How to set selection area color and continuance polygon like command "erase" "wp" in lisp (ssget)?

 

(princ "\nSelect Cogo Points by Widow Polygon : ")
(if (setq pt (getpoint "\nSpecify a point:"))
(progn
(setq ptlst (list pt))
(while (setq pt (getpoint pt "\nSpecify a point:"))
(redraw)
(setq ptlst (cons pt ptlst))
(grvecs (apply 'append (mapcar 'list ptlst (cdr ptlst))))
)
))

(setq ss (ssget "_WP" ptlst '(( 0 . "AECC_COGO_POINT"))))
(repeat (setq in (sslength ss))
(vla-highlight (vlax-ename->vla-object (ssname ss (setq in (1- in)))) :vlax-true)
)

0 Likes
Accepted solutions (1)
338 Views
2 Replies
Replies (2)
Message 2 of 3

Sea-Haven
Mentor
Mentor

This is how I make a window polygon for "F WP CP"

 

 

(command-s "pline")
(setq ptlst (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (entlast)))))
(setq ptlst (cons (last ptlst) ptlst)) ; makes a closed list of points

 

Message 3 of 3

paullimapa
Mentor
Mentor
Accepted solution

If you want to see the Visual Effects of the selection window color then try this.

Replace these lines:

(princ "\nSelect Cogo Points by Widow Polygon : ")
(if (setq pt (getpoint "\nSpecify a point:"))
(progn
(setq ptlst (list pt))
(while (setq pt (getpoint pt "\nSpecify a point:"))
(redraw)
(setq ptlst (cons pt ptlst))
(grvecs (apply 'append (mapcar 'list ptlst (cdr ptlst))))
)
))

With these lines:

(if (setq pt (getpoint "\nSpecify a point:"))
(progn
(setq ptlst (list pt))
(command"_.Area" pt)
(while (setq pt (getpoint pt "\nSpecify a point:"))
(redraw)
(setq ptlst (cons pt ptlst))
(grvecs (apply 'append (mapcar 'list ptlst (cdr ptlst))))
(command pt)
)
))(command"""_.Redraw")

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos