list entity in ListBox

Discussion in 'AutoCAD' started by nalsur8, Aug 18, 2004.

  1. nalsur8

    nalsur8 Guest

    hallo i'm new in vba but not in Lisp and i try to change my lisp code
    to vba...

    how look like the coding for check the entity (line)
    and put it them to ListBox
     
    nalsur8, Aug 18, 2004
    #1
  2. nalsur8

    jdinardi Guest

    Hi nalsur. You can check the type of an entity like this:

    Dim oEnt as AcadEntity

    ' Assume oEnt contains an unknown AcadEntity from either a call to GetEntity or maybe you are looping through a selection set, etc...

    If TypeOf oEnt Is AcadLine Then
    ' I'm not sure what you want to add to a list box, maybe the handle?
    ListBox1.AddItem oEnt.Handle
    End If


    Regards,
    Jacob Dinardi
     
    jdinardi, Aug 19, 2004
    #2
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.