Suppress Text Window During Macro - A2K4

Discussion in 'AutoCAD' started by John Henry, Dec 23, 2003.

  1. John Henry

    John Henry Guest

    Hello,

    We recently upgraded to A2K4 from A2K. We had toolbars in A2K that had macros set up that would change the current dim style like
    this- ^C^C_Dim Restore Yourdimstyle E

    In A2K4 this macro brings up the text window. I checked the help files and found a different way to do the macro - ^C^C-Dimstyle
    Restore Yourdimstyle - but I get the same thing, the text window pops up. I added the "graphscr" command to the end of each, and
    that closes the text window, but it still pops up momentarily before closing, causing an irritating "flash" effect.

    Is there a way to suppress the text window during this macro?

    Thanks,
    John

    (P.S. - I know about the new dimstyle pull-down in A2K4, but most of my users prefer our toolbar)
     
    John Henry, Dec 23, 2003
    #1
  2. You could try setting CMDECHO to zero run -dimstyle
    and then return CMDECHO to one.

    --

    -Jason
    Member of the Autodesk Discussion Forum Moderator Program


    that would change the current dim style like
    different way to do the macro - ^C^C-Dimstyle
    "graphscr" command to the end of each, and
     
    Jason Piercey, Dec 23, 2003
    #2
  3. John Henry

    John Henry Guest

    I'll give that a try, I didn't know that CMDECHO could bring up the text window.

    Thanks,
    John
     
    John Henry, Dec 23, 2003
    #3
  4. CMDECHO doesn't bring up the text window. The call
    to -dimstyle is what does it.
     
    Jason Piercey, Dec 23, 2003
    #4
  5. John Henry

    John Henry Guest

    The CMDECHO approach didn't work. I tried several different ways and the text window still pops up. I'm open for any other ideas you
    might have.

    The funny thing is, I can't think of any reason why the -dimstyle command *should* pop up the text window. Is there some advantage
    I'm not seeing?

    Thanks for the input,
    John
     
    John Henry, Dec 24, 2003
    #5
  6. John Henry

    Jeff Mishler Guest

    John,
    This is an "annoyance" that's been around for some time. The strange thing
    is, what Jason suggested works when it is a part of a lisp routine but
    doesn't (as you found out) when in a macro.
    SO, if you take the following lisp, make sure it gets loaded with each
    drawing, and make a call to it via your button(s) it will eliminate the
    textscreen flash.
    Button macro: ^C^C(restore_dim "test")
    Replace the "test" with whatever style you want. You can have 100 different
    buttons , if you wish, each one calling their own style.

    (defun restore_dim (dim / cmd)
    (setq cmd (getvar "cmdecho"))
    (setvar "cmdecho" 0)
    (command "_-dimstyle" "_r" dim)
    (setvar "cmdecho" cmd)
    (princ)
    )

    Note, I've tested this with 2002, and I believe it will work in 2004.
    HTH,
    Jeff
    text window still pops up. I'm open for any other ideas you
    *should* pop up the text window. Is there some advantage
     
    Jeff Mishler, Dec 24, 2003
    #6
  7. John Henry

    John Henry Guest

    That works great, thank you so much!!

    Thanks to all for the help, have a happy holidays.
    John
     
    John Henry, Dec 24, 2003
    #7
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.