TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: MvdP on November 01, 2006, 04:34:02 AM

Title: Highlight selected LWPOLYLINE
Post by: MvdP on November 01, 2006, 04:34:02 AM
I have a routine that has this piece of code but is it not highlighting the selected closed lwpolyline.


Code: [Select]
(prompt "\nSelect CLOSED  Polyline: ")
(while (not (setq ss (ssget ":e:s" '((0 . "LWPOLYLINE") (70 . 1)))))
(prompt "\nSelected object NOT a closed  Polyline.... "))

And the variable highlight is set to 1.
Can this piece of code be changed that when i select a lwpolyline it is highlighted.?
Title: Re: Highlight selected LWPOLYLINE
Post by: Kerry on November 01, 2006, 06:05:27 AM
Look at redraw .. just a sec'
Title: Re: Highlight selected LWPOLYLINE
Post by: Kerry on November 01, 2006, 06:06:59 AM
Perhaps try something like this ;
Code: [Select]
(PROMPT "\nSelect CLOSED  Polyline: ")
(WHILE (NOT (SETQ ss (SSGET ":e:s" '((0 . "LWPOLYLINE") (70 . 1)))))
  (PROMPT "\nSelected object NOT a closed  Polyline.... ")
)
(IF (SETQ ent (SSNAME ss 0))
  (REDRAW ent 3)
)
Title: Re: Highlight selected LWPOLYLINE
Post by: gile on November 01, 2006, 06:09:02 AM
Hi,

Something like this ?

Code: [Select]
(prompt "\nSelect CLOSED  Polyline: ")
   (while (not
    (setq ss (ssget "_:E:S" '((0 . "LWPOLYLINE") (70 . 1))))
  )
     (prompt "\nSelected object NOT a closed  Polyline.... ")
   )
   (sssetfirst nil ss)
Title: Re: Highlight selected LWPOLYLINE
Post by: MvdP on November 01, 2006, 06:23:26 AM
Thank you gile  and Kerry for your suggestions.
Kerry in your code the selected polyline stays highlighted and in gile's one it is not.!So i will use gile's piece of code.

Title: Re: Highlight selected LWPOLYLINE
Post by: Kerry on November 01, 2006, 06:33:44 AM
Oh, I thought you wanted it highlighted ..
Title: Re: Highlight selected LWPOLYLINE
Post by: MvdP on November 01, 2006, 06:42:19 AM
Yes i did , but when the complete routine has run not anymore.Sorry about not mentioning that Kerry