See the top rated post in this thread. Click here

Results 1 to 5 of 5

Thread: Repeat menu command

  1. #1
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Repeat menu command

    I have this macro in my dropdown meny ( *.mnu/*.mns or *.cui )
    Code:
    ^C^C(if c:bn (c:bn) (progn (load "K:/kennets/Lisp/Block/BlockName.fas" ) (c:bn) ) )
    What it does is :
    check if the c:bn command is present in curren task
    if T run (c:bn)
    if nil load the program, then run (c:bn)

    It works well when I pick from the dropdown menu,
    but it does not run (c:bn) next time when I hit [Space] or [Enter]
    ( a previous Command runs )

    How can I rewrite the macro, so (c:bn) runs again when I hit [Space] or [Enter] ?

    : ) Happy Computing !

    kennet

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    1

    Default Re: Repeat menu command

    Try:
    Code:
    ^C^C^P(or c:bn (load "K:/kennets/Lisp/Block/BlockName.fas" ));bn

  3. #3
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Repeat menu command

    Thank you Tom for your help

    : ) Happy Computing !

    kennet

  4. #4
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    277
    Login to Give a bone
    0

    Default Re: Repeat menu command

    Hi kennet,
    I have code routine to load a program,it's ok
    Code:
    [Transistor]^C^C (if(not c:tran)(load "D:/YBI/Program/AutoLisp/Lisp program/My Alls Program/0307-Transistor.lsp"));tran;
    Quote Originally Posted by kennet.sjoberg
    I have this macro in my dropdown meny ( *.mnu/*.mns or *.cui )
    Code:
    ^C^C(if c:bn (c:bn) (progn (load "K:/kennets/Lisp/Block/BlockName.fas" ) (c:bn) ) )
    What it does is :
    check if the c:bn command is present in curren task
    if T run (c:bn)
    if nil load the program, then run (c:bn)

    It works well when I pick from the dropdown menu,
    but it does not run (c:bn) next time when I hit [Space] or [Enter]
    ( a previous Command runs )

    How can I rewrite the macro, so (c:bn) runs again when I hit [Space] or [Enter] ?

    : ) Happy Computing !

    kennet

  5. #5
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Repeat menu command

    Thank you Adesu, the same solution that Tom send me,
    it was the "tail" I was doing wrong (c:bn) instead of ;bn

    : ) Happy Computing !

    kennet

Similar Threads

  1. Repeat Last Command
    By gmg in forum Revit - Platform
    Replies: 4
    Last Post: 2013-04-20, 10:29 PM
  2. Repeat last command
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2013-01-04, 05:39 PM
  3. Command alias repeat on the command line
    By rbilger in forum AutoCAD General
    Replies: 8
    Last Post: 2011-08-18, 09:47 PM
  4. repeat command
    By Ning Zhou in forum Revit Architecture - General
    Replies: 2
    Last Post: 2009-12-14, 07:59 PM
  5. How to make arc command repeat?
    By cargo33us120260 in forum AutoLISP
    Replies: 14
    Last Post: 2007-01-11, 05:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •