Author Topic: Highlight selected LWPOLYLINE  (Read 2498 times)

0 Members and 1 Guest are viewing this topic.

MvdP

  • Guest
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.?

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'
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

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)
)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

gile

  • Gator
  • Posts: 2507
  • 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

  • Guest
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.


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 ..
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MvdP

  • Guest
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