How to hightlight entities in all viewports

Discussion in 'AutoCAD' started by Paul de Boer, Oct 3, 2004.

  1. Paul de Boer

    Paul de Boer Guest

    Hi all, I'm having this problem that if i use ENTSEL select an entitie, using REDRAW 3 to highlight the entitie it only highlight it in the viewport it is selected. Is it possible to highlight it in all viewports???

    Many thanks
    P. de Boer
     
    Paul de Boer, Oct 3, 2004
    #1
  2. Paul de Boer

    John Uhden Guest

    If you don't mind the grips, you could (sssetfirst nil (ssadd e)), otherwise
    perhaps hold (command "_.select" e) open and then (command) when done. In both
    cases HIGHLIGHT must be on.




    REDRAW 3 to highlight the entitie it only highlight it in the viewport it is
    selected. Is it possible to highlight it in all viewports???
     
    John Uhden, Oct 3, 2004
    #2
  3. ;;;You have to activate each VPORT and redraw in each one
    ;;;Be sure of redrawing with 4 value or do a REDRAWALL at the end of the
    function
    ;;; or in error function

    (defun red_inallvp (ent val / lsvp cvp vpred)
    (setq cvp (getvar "CVPORT"))
    (setq lsvp (vports))
    (if (/= 1 (nth 0 (car lsvp)))
    (progn
    (while lsvp
    (if (/= 1 (setq vpred (nth 0 (car lsvp))))
    (progn
    (setvar "CVPORT" vpred)
    (redraw ent val)
    )
    )
    (setq lsvp (cdr lsvp))
    )
    (setvar "CVPORT" cvp)
    )
    )
    )


    defun c:testit (/ ent val)
    (setq ent (car (entsel)))
    (setq val 3);; or 4

    (red_inallvp ent val)
    )



    using REDRAW 3 to highlight the entitie it only highlight it in the viewport
    it is selected. Is it possible to highlight it in all viewports???
     
    Gustavo Guidi, Oct 4, 2004
    #3
  4. Paul de Boer

    Paul de Boer Guest

    Many thanks Guidi, works great.
     
    Paul de Boer, Oct 4, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.