Tab and Down Arrow in lisp? Grread?

Discussion in 'AutoCAD' started by calpolyarc, Aug 4, 2004.

  1. calpolyarc

    calpolyarc Guest

    Can someone please help me, I am trying to create the following command structure in a lisp:

    2dsectioneditcomponent <enter>
    select lines <enter>
    <tab>
    <tab>
    <down arrow>
    <down arrow>
    <down arrow>
    <enter>

    Thanks!!
     
    calpolyarc, Aug 4, 2004
    #1
  2. calpolyarc

    calpolyarc Guest

    How does grread work?
     
    calpolyarc, Aug 4, 2004
    #2
  3. calpolyarc

    calpolyarc Guest

    Can someone plase tell me if this is even possible, or am I wasting my time?!
     
    calpolyarc, Aug 5, 2004
    #3
  4. calpolyarc

    calpolyarc Guest

    Ok, this is the last time I'll reply to my own message just to bump it up to the top of the list.... :)
     
    calpolyarc, Aug 6, 2004
    #4
  5. Have you tried it? (grread)

    Command: (grread)
    (2 9)
    Command: (grread)
    (2 40)


    --
    R. Robert Bell


    Can someone please help me, I am trying to create the following command
    structure in a lisp:

    2dsectioneditcomponent <enter>
    select lines <enter>
    <tab>
    <tab>
    <down arrow>
    <down arrow>
    <down arrow>
    <enter>

    Thanks!!
     
    R. Robert Bell, Aug 6, 2004
    #5
  6. I can't quite tell from your description what you are trying to achieve - maybe a little more description will bring in more responses...

    grread returns information from user input devices such as the keyboard, mouse and tablet. The help topic does a reasonable job of describing its usage.

    For instance - if you wanted to know when the user is pressing the tab key or enter key, you could use a function like this:

    (defun f:keydown (prm / key)
    (princ prm)
    (while (/= (car (setq key (grread 10))) 2))
    (cadr key)
    )

    (defun c:test ()
    (princ (f:keydown "\nTest: "))
    (princ));defun

    TAB will return 9 and ENTER returns 13 - grread does not seem to capture arrow keydowns. (you could add numpad accelerators to a menu for the arrows on the number pad...)


    It seems, however, that you want to send keystrokes - perhaps to navigate through a dialog? Grread won't help you with this - something like SendKeys in vb/vba will send keystrokes. If this is the case, it would be useful to give a more precise description of what you are trying to achieve as there may be a more direct means than going through the dialog.

    Peter
     
    petersciganek, Aug 6, 2004
    #6
  7. calpolyarc

    calpolyarc Guest

    Thanks for the clarification peter! You are correct, my goal is to SEND keystrokes, not retrieve them, and yes it is to navigate through a dialog. The function I am using is in Arch. Desktop and I do not think there is an alternate way of achieving my goal, say through the command line, you have to go through the dialog. The command structure in my original post is exactly what I'm trying to achieve. If I hit those keys I get what I want. I will, however, have multiple buttons that end up having a different number of <down arrow>'s. Thanks for your help!
     
    calpolyarc, Aug 6, 2004
    #7
  8. I have ADT 3.3 - no command "2dsectioneditcomponent" - though I'm working with a german version.

    There is a description of the ADT object model in the developer help - maybe you can make your changes via activex...

    You can send keystrokes to the keyboard with vbstmt - but, as far as I know, this can't be called transparently.

    Peter
     
    petersciganek, Aug 6, 2004
    #8
  9. calpolyarc

    calpolyarc Guest

    peter,
    I have spent some time reading through the help files on activex, vb, and ADT object models. I have never used activex or vb before and to be honest, don't have a clue as to what they really do, aside from some kind of programming. I also tried searching for 'vbstmt' in all of the help menus I could find but I got zero results. Can you narrow my search a little bit more for me please?!? :) Bitte shuen.
     
    calpolyarc, Aug 6, 2004
    #9
  10. The command is vbastmt, not vbstmt - my mistake. The command simply allows you to pass a vba statement to the command line.

    What version of ADT do you have. As I stated above, I do not have the command "_2dsectioneditcomponent" on ADT 3.3 (german) - so it will be difficult to get any sense of what you are doing.

    If the only way to make the modifications that you need to is through the dialog - and it requires the exact sequence that you describe, then it seems to me that you are stuck with the ADT UI. At best, you could create a separate executable that you would need to start somehow from autocad after starting 2dsectioneditcomponent command that would send keystrokes to the Acad window. If this is the case, then it is a flaw in ADT - the advantage of AutoCAD is that most (if not all) - modifications can be done programmatically, in the worst case - by using the "command" function in lisp.

    Peter
     
    petersciganek, Aug 9, 2004
    #10
  11. calpolyarc

    calpolyarc Guest

    I am using ADT2004.
     
    calpolyarc, Aug 9, 2004
    #11
  12. Well, that precludes my help for now - try me again in 3 or 4 months - maybe we'll upgrade.

    Perhaps you should try reposting this with some keywords such as ADT 2004, navigate dialog, 2dsectioneditcomponent etc... - also, try the ADT discussion group.

    Good luck

    Peter
     
    petersciganek, Aug 9, 2004
    #12
  13. calpolyarc

    Anne Brown Guest

    In addition to any replies you might receive or have already
    received, you may find more information or responses by posting
    future Architectural Desktop Customization related questions in
    the following discussion group:

    Web browser: http://discussion.autodesk.com/WebX?14@@.ee77eaa
    Newsreader:
    news://discussion.autodesk.com/autodesk.aec.arch-desktop.customization
     
    Anne Brown, Aug 9, 2004
    #13
  14. calpolyarc

    dshanna Guest

    Calpolyarc,

    I am attempting a similar task with Land Desktop.

    I want to create a toolbar that will initiate a LDD specific
    command and then tab a known amount of times and
    change some text values in the dialog and then exit from it.

    At this point I have not been able to get the tabs to work
    in my menu macro.

    Did you ever have any luck getting this to work for you?
    If so please let me know how.

    Thanks
     
    dshanna, Oct 21, 2004
    #14
  15. calpolyarc

    calpolyarc Guest

    No I never had any luck figuring this problem out, sorry!
     
    calpolyarc, Oct 21, 2004
    #15
  16. calpolyarc

    dshanna Guest

    Thanks anyway.

    I have still been searching, but to no avail.

    I think this is just going to be limited to the functionality
    of AutoCAD and cannot be done.

    Good Luck
     
    dshanna, Oct 21, 2004
    #16
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.