repeating a macro, * doesn't work

Discussion in 'AutoCAD' started by Laura, Jun 15, 2004.

  1. Laura

    Laura Guest

    I'v made a button that aligns 1 object with the 2 points without scaling it.
    I want it to repeat itself.
    I thought I could do that with the asterix * , but this doesn't work.
    How can I repeat this button?

    ^C^C.align;\;\\\\;n;

    Thanks,

    laura
     
    Laura, Jun 15, 2004
    #1
  2. Laura

    Chip Harper Guest

    I'm sorry but I don't see the * in your code .... should look like this
    .....

    ^C^C*_align;\;\\\\;n;
     
    Chip Harper, Jun 15, 2004
    #2
  3. Laura

    Laura Guest

    Hi Chip,

    When I use this I get
    "Unknown command "*_ALIGN". Press F1 for help. "

    I've tried the asterix before the command and that didn't work
    *^C^C.align;\;\\\\;n;

    laura
     
    Laura, Jun 15, 2004
    #3
  4. It might depend on where you have this menu macro in your menu structure.
    Help says:

    "Menu macro repetition does not work for items in Image tile menus."

    Also, I hope it doesn't matter, but all the examples in Help, illustrating
    menu macro repetition, have the command name without the leading ".", so you
    might try doing it that way and see whether that works.

    Kent Cooper, AIA


    ...
     
    Kent Cooper, AIA, Jun 15, 2004
    #4
  5. Laura

    zeha Guest

    on the command line you can try this
    and then put it in your macro

    multiple

    Enter command name to repeat:

    align


    Initializing...
     
    zeha, Jun 15, 2004
    #5
  6. Laura

    Laura Guest

    I hadn't heard of this command, but I'm going to use it. It's very good.

    It works with commands like line, erase etc., but not with the align
    command.
    Is align not some hidden lisproutine in AutoCAD 2000i and is that the reason
    it doesn't work?

    I've tried it with all the possible combinations. Also withhout the "."

    I'm using the macro under a button so I don't think it's in a "Image tile
    menu"
    I've consulted help on this topic. But I could be wrong.


    Laura
     
    Laura, Jun 15, 2004
    #6
  7. Just for your information, "multiple" doesn't work with Align in 2004
    either. I wonder whether that has anything to do with the fact that the
    *^C^C beginning of you macro routine doesn't work? It shouldn't, because I
    think that beginning is supposed to "store" the overall macro and recall it,
    which I would think should work even if a particular command within it
    doesn't happen to work with "multiple".

    Kent Cooper, AIA

    .....
     
    Kent Cooper, AIA, Jun 15, 2004
    #7
  8. Laura

    Laura Guest

    When I use it without the ^C^C I get
    "Unknown command "*_ALIGN". Press F1 for help. "
    (tried it with *-ALIGN, *.ALIGN, *ALIGN etc.)

    I've got a not so very elegant solution and that is copy the command inside
    the button, like

    ..align;\;\\\\;n;.align;\;\\\\;n;.align;\;\\\\;n;.align;\;\\\\;n;.align;\;\\\
    \;n;

    laura
     
    Laura, Jun 16, 2004
    #8
  9. Laura

    Jürg Menzi Guest

    Hi Laura
    AFAIK 'Align' is an arx command, therefore it doesn't work with * and
    multiple...

    Cheers
     
    Jürg Menzi, Jun 16, 2004
    #9
  10. Maybe this is a place to use a defined "command" using defun. If you defun
    something called (for example) ALIGNSTUFF into a custom command, then at
    least you can call it up with a button or menu item somewhere (or name it
    something much shorter and type it in), and then recall it instantly as many
    times as you want with Enter.

    Kent Cooper, AIA


    ...
     
    Kent Cooper, AIA, Jun 16, 2004
    #10
  11. Laura

    ECCAD Guest

    Replace: ^C^C.align;\;\\\\;n;
    With:
    ^c^c(defun C:ALN ()(command ".align" "" pause "" pause pause pause pause "" "n" "")) (C:ALN)

    Bob
     
    ECCAD, Jun 16, 2004
    #11
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.