What is wrong with this SendCommand?

Discussion in 'AutoCAD' started by ajtruckle, Dec 16, 2004.

  1. ajtruckle

    ajtruckle Guest

    [pre]
    Dim strCommand As String
    strCommand = "break "
    strCommand = strCommand & ent.Handle
    strCommand = strCommand & " f"
    strCommand = strCommand & " " & breakPnt(0) & "," & breakPnt(1) & "," & breakPnt(2)
    strCommand = strCommand & " " & breakPnt(0) & "," & breakPnt(1) & "," & breakPnt(2)
    strCommand = strCommand & vbCr

    ThisDrawing.SendCommand (strCommand)
    [/pre]

    I think the ent.Handle is wrong (ent is a AcadObject)
     
    ajtruckle, Dec 16, 2004
    #1
  2. hi,


    first you cannot select an entity at the command-prompt with 'ent.handle', instead use

    dim tObjLspByHandle as String
    tObjLspByHandle = "(handent """ & ent.handle & """)"

    next you have to make sure, that your decimal-separator is a point and not a column, so:
    dim tXStr as String
    tXStr = replace(breakpoint(0),",",".")

    - alfred -
     
    Alfred NESWADBA, Dec 16, 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.