Author Topic: Highlight selected LWPOLYLINE  (Read 1123 times)

0 Members and 1 Guest are viewing this topic.

MvdP

  • Bull Frog
  • Posts: 261
Highlight selected LWPOLYLINE
« 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.?
AutoCAD 2012
Revit 2013
W7 pro x64
******************

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Highlight selected LWPOLYLINE
« Reply #1 on: November 01, 2006, 06:05:27 AM »
Look at redraw .. just a sec'
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Highlight selected LWPOLYLINE
« Reply #2 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)
)
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

gile

  • Water Moccasin
  • Posts: 2234
  • Marseille, France
Re: Highlight selected LWPOLYLINE
« Reply #3 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)
Speaking English as a French Frog

MvdP

  • Bull Frog
  • Posts: 261
Re: Highlight selected LWPOLYLINE
« Reply #4 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.

AutoCAD 2012
Revit 2013
W7 pro x64
******************

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Highlight selected LWPOLYLINE
« Reply #5 on: November 01, 2006, 06:33:44 AM »
Oh, I thought you wanted it highlighted ..
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

MvdP

  • Bull Frog
  • Posts: 261
Re: Highlight selected LWPOLYLINE
« Reply #6 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
AutoCAD 2012
Revit 2013
W7 pro x64
******************