Measure in VBA

Discussion in 'AutoCAD' started by johan, Aug 5, 2003.

  1. johan

    johan Guest

    Hi,
    I'm trying to use the measure command in a VBA application on entities in a
    selection set. I've done with Vlisp but I can't find it in VBA.

    Any suggestions?

    Regards
    Johan
     
    johan, Aug 5, 2003
    #1
  2. johan

    Ed Jobe Guest

    The Measure command is still the Measure command. Do you mean you need the
    vba counterpart to the (command) function? Its ThisDrawing.SendCommand.
     
    Ed Jobe, Aug 6, 2003
    #2
  3. johan

    johan Guest

    In lisp I use the function 'ssname' to get the the entities names in a
    collection. Then I use the entities names in the command function. So what
    I'm looking for is the vba counterpart to ssname to refer to the specific
    entities in the SendCommand function.

    I've tried to set the entity name to handle, objectID like this:

    entityname = selectionset.item(x).handle/objectID
    ThisDrawing.SendCommand "measure" & entityname & ...

    Johan
     
    johan, Aug 6, 2003
    #3
  4. .... to refer to the specific

    Run this in the debug window while in modelspace... with at least 1 entity .

    Thisdrawing.SendCommand "list (handent """ &
    thisdrawing.modelspace(0).handle & """) "

    James
     
    James Belshan, Aug 7, 2003
    #4
  5. johan

    johan Guest

    Thanks!
    It's working now!
    Johan

     
    johan, Aug 8, 2003
    #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.