Jump to content

Poliline flashing


rodrigo_sjc_sp

Recommended Posts

Is there any way to SET a polyline with 3 alternate colors?

 

Ex: colors (yellow, red, green)

 

The polyline turns yellow after 1 second turns red after 1 second

turns green, and the end of her green back to yellow in an infinite loop?

 

What I need is to draw attention to the Polyline defective in design, and thought to set one or more colors and let them alternating between polyline.

Link to comment
Share on other sites

Is there any way to create a timer in LISP, 1 in 1 second it executes the command to change the color?

 

Need more control timer because once you see the problem, I need to stop it, and set a neutral color.

Link to comment
Share on other sites

(defun c:flash ( / *error* cmd col ent enx old )
   (defun *error* ( m )
       (if old (entmod (append ent old)))
       (if cmd (setvar 'cmdecho cmd))
       (princ)
   )          
   (if (setq ent (car (entsel)))
       (progn
           (setq enx (entget ent)
                 old (list (cond ((assoc 62 enx)) ('(62 . 256))))
                 cmd (getvar 'cmdecho)
                 col 2
           )
           (setvar 'cmdecho 0)
           (while (= 5 (car (grread t 13 1)))
               (entmod (append enx (list (cons 62 (setq col (1+ (- 2 col)))))))
               (command "_.delay" 150)
           )
           (entmod (append enx old))
           (setvar 'cmdecho cmd)
       )
   )
   (princ)
)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...