Is Possible? (A transparent VBA Macro)

Discussion in 'AutoCAD' started by GTASteve, Oct 19, 2004.

  1. GTASteve

    GTASteve Guest

    Allow me to clarify...

    I would like, to be able to "return a point from VBA"...
    e.g.
    Command: Line
    LINE Specify first point: 0,0
    Specify next point or [Undo]: 'myAlias
    {{{links to my vba code... gets a point, and uses it...}}}
    Specify next point or [Undo]:

    I know I can wrap VLisp around my Macro call, (this allows me to define myAlias, and have keyboard access to the macro), but it appears that this *Cancels* the active command. (ugh)...

    I'm open to any and all hacks ;-) but I must admit, I'd rather not have to settle for a toolbar button (slow and awkward)

    Cheers,
    GTASteve
     
    GTASteve, Oct 19, 2004
    #1
  2. GTASteve

    lorier Guest

    hi,

    one way would be to capture the 'line' command in
    Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)
    if CommandName = ".LINE" then
    'code here
    End Sub

    another similar one would be to define your own line command

    or if you know where the point is to begin with or it's relative to the last point picked i think you could define a vlisp variable to the point

    or any combination of the above.

    hope this helps
     
    lorier, Oct 20, 2004
    #2
  3. GTASteve

    GTASteve Guest

    Hi Lorier,

    Interesting ideas... unfortunately, as I read the documentation further, I read that transparent commands, that involve selecting objects, won't *likely* work.

    I guess what I really want, is a wrapper, for {getPoint}, where {getPoint}, is anywhere that Acad asks the user for a point... but I think I'm going to be out of luck on this one... ;-)

    Hmmm... time to think some more...

    GTASteve
     
    GTASteve, Oct 20, 2004
    #3
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.