vla-highlight

Discussion in 'AutoCAD' started by Mark Propst, Jan 26, 2004.

  1. Mark Propst

    Mark Propst Guest

    After reading 150 posts on google re: vla-highlight, no one has said it
    doesn't work, so I know it's me...but...
    this works
    (defun highlight1 (ent)
    (redraw ent 3)
    )
    this doesn't work
    (defun highlight2 (ent / vo)
    (setq vo(vlax-ename->vla-object ent))
    (vla-highlight vo :vlax-true)
    (vla-update vo )
    )
    this doesn't work
    (defun Highlight3(ent / vo)
    (setq vo(vlax-ename->vla-object ent))
    (vlax-invoke-method vo "HIGHLIGHT" :vlax-true)
    (vla-update vo )
    )

    this doesn't work
    (defun Highlight4(ent / vo)
    (setq vo(vlax-ename->vla-object ent))
    (vlax-invoke-method vo 'highlight :vlax-true)
    (vla-update vo )
    )
    and this doesn't work
    Sub testhighlight()
    Dim oEnt As AcadEntity
    Dim vp As Variant
    ThisDrawing.Utility.GetEntity oEnt, vp, "Pick something"
    oEnt.Highlight True
    oEnt.Update
    MsgBox "Did that work?"
    oEnt.Highlight False
    oEnt.Update
    MsgBox "Did that work?"
    End Sub

    as usual I must be missing something stupidly obvious, any one care to clue
    me in?
     
    Mark Propst, Jan 26, 2004
    #1
  2. Mark Propst

    Jeff Mishler Guest

    Mark,
    Don't believe everything the Help file tries to tell you..... 2, 3 & 4 ALL
    work, IF you remove the call to update....

    Jeff
     
    Jeff Mishler, Jan 27, 2004
    #2
  3. Mark Propst

    Mark Propst Guest

    hmmm...
    from help file:
    "Remarks
    Once the highlight flag for an object has been set, a call to the Update or
    Regen method is required to view the change. "

    guess I should quit reading the help files!

    :)~
     
    Mark Propst, Jan 27, 2004
    #3
  4. Mark Propst

    Mark Propst Guest

    but not with atts in blocks!
    (setq ent(car(nentsel"Pick attrib")))
    (redraw ent 3 );works
    (vla-highlight(vlax-ename->vla-object ent):vlax-true);no workie (even
    without update)
     
    Mark Propst, Jan 27, 2004
    #4
  5. Mark Propst

    Jeff Mishler Guest

    Hmmm, you are right! And the thread "vla-highlight" started by "Leo" on
    11/13/02 has comments from Doug Broad and Luis E. confirming this.....
     
    Jeff Mishler, Jan 27, 2004
    #5
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.