Command Line Suppression

Discussion in 'AutoCAD' started by thenov, Oct 11, 2004.

  1. thenov

    thenov Guest

    I have a VBA macro where I am using the Send Command feature to send commands to the EATTEXT command. It
    works fine except that I can NOT suppress the display of what is happening on the command. I do NOT want to see anything on the command line when the EATTEXT command is running. I have tried turing off the usual suspects like cmdecho and nomutt but none of these work. Does anyone know how to suppress the prompt during the use of the EATTEXT command? Please let me know.
     
    thenov, Oct 11, 2004
    #1
  2. thenov

    VBA Guest

    Have you tried turning the CMDECHO off?

    commands to the EATTEXT command. It
    on the command. I do NOT want to see anything on the command line when the
    EATTEXT command is running. I have tried turing off the usual suspects like
    cmdecho and nomutt but none of these work. Does anyone know how to suppress
    the prompt during the use of the EATTEXT command? Please let me know.
     
    VBA, Oct 11, 2004
    #2
  3. thenov

    thenov Guest

    Yes I have tried turning CMDECHO and NOMUTT of as stated in my question. Neither one worked.
     
    thenov, Oct 11, 2004
    #3
  4. Hi,

    If you care to search back in this NG (months ago), or in the Land Desktop
    customisation (this week), I have posted a method for doing this.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au

    commands to the EATTEXT command. It
    on the command. I do NOT want to see anything on the command line when the
    EATTEXT command is running. I have tried turing off the usual suspects like
    cmdecho and nomutt but none of these work. Does anyone know how to suppress
    the prompt during the use of the EATTEXT command? Please let me know.
     
    Laurie Comerford, Oct 11, 2004
    #4
  5. thenov

    VBA Guest

    Oops, sorry. I didn't see that, hmm - I'd say you are SOL.

    Neither one worked.
     
    VBA, Oct 11, 2004
    #5
  6. Ok, but is there a way to do this without using autolisp?
     
    Mark Johnston, Oct 13, 2004
    #6
  7. Hi Mark,

    Do you think I would have gone to the effort of devising this if a knew an
    alternative ?

    However, that said, what's wrong with Lisp ?

    --

    Regards,


    Laurie Comerford
    www.cadapps.com.au
     
    Laurie Comerford, Oct 13, 2004
    #7
  8. Hi Laurie,
    Sure, you might have gone to the effort if you really liked lisp. :)
    Don't get me started.

    Respectfully,
    Mark
     
    Mark Johnston, Oct 13, 2004
    #8
  9. Hi Mark,

    All programming languages are simply tools to do something. In my
    observations blanket statements that they are "useless" - "wonderful" etc.
    usually relate to the writer's own skills with them and have very little to
    do with the language itself.

    I write mostly in VBA because the help files are very extensive and the
    editor is elegant compared with the other editors available for programming
    AutoCAD. After programming in Basic based languages since the early 1980's
    I also have a good feel for the language.

    When my knowledge of VBA doesn't allow me to do what I want and lisp can,
    then I use lisp or scripting or menu commands etc. If I still can't do it,
    then I either don't do it or seek help.

    My only complaint against all these languages is that they aren't self
    writing and documenting from my initial idea.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au
     
    Laurie Comerford, Oct 13, 2004
    #9
  10. thenov

    Kevin Terry Guest

    lol
    ditto ;)

    Kevin
     
    Kevin Terry, Oct 14, 2004
    #10
  11. Hi Laurie,
    Nicely stated. My response was strictly for "trouble making" purposes.

    I had this discussion with myself:
    Me: My preference for VB/A is because it's the language that I have the most
    experience in.
    Myself: Yes but the reason you have the most experience in it is because you
    like using it best. Especially the graphical interface part.
    Me: But truthfully I never really gave learning DCL much effort.
    Myself: Learning to create graphical interfaces in VBA took almost no time.
    So why struggle learning DCL?
    Me: Lisp is just another tool to do the same tasks.
    Myself: I agree with me. It's like a hand saw does a terrific job cutting
    wood just like a CNC panel saw does.
    Me: Is that sarcasm? Implying that lisp is old fashioned?
    Myself: I don't think so. You can't cut an opening in a wall to deliver your
    new CNC saw with the CNC saw. It takes a tool with different capabibilities.
    Like a hand saw.
    Me: So what are you saying? because I'm confused now.
    Myself: Maybe if you didn't talk to myself I wouldn't be confused.

    I'll get in trouble for this but - Lisp is like a Ford and VB/A is like a
    BMW. Both can get you somewhere. But if both are sitting there and you have
    the keys which one would you choose? You can do stuff in a BMW that you
    can't do in a Ford. Provided, of course, you aren't concerned about the
    apholstery.

    There. I said it.

    Mark
     
    Mark Johnston, Oct 15, 2004
    #11
  12. thenov

    lorier Guest

    I don't know, but maybe you can fake it by changing the color of the commandline text, e.g. white

    Sub Example_TextWinTextColor()
    ' This example returns the current setting of
    ' TextWinTextColor. It then changes the value, and finally
    ' it resets the value back to the original setting.

    Dim preferences As AcadPreferences
    Dim currTextWinTextColor As Long

    Set preferences = ThisDrawing.Application.preferences

    ' Retrieve the current TextWinTextColor value
    currTextWinTextColor = preferences.Display.TextWinTextColor
    MsgBox "The current value for TextWinTextColor is " _
    & preferences.Display.TextWinTextColor, vbInformation, "TextWinTextColor Example"

    ' Change the value for TextWinTextColor
    preferences.Display.TextWinTextColor = vbGreen
    MsgBox "The new value for TextWinTextColor is " _
    & preferences.Display.TextWinTextColor, vbInformation, "TextWinTextColor Example"

    ' Reset TextWinTextColor to its original value
    preferences.Display.TextWinTextColor = currTextWinTextColor
    MsgBox "The TextWinTextColor value is reset to " _
    & preferences.Display.TextWinTextColor, vbInformation, "TextWinTextColor Example"
    End Sub
     
    lorier, Oct 20, 2004
    #12
  13. thenov

    tsigwing Guest

    But when you reset the color, the commands then will be shown.
     
    tsigwing, Oct 20, 2004
    #13
  14. thenov

    thenov Guest

    Thanks! This Idea worked great. I simply changed the current text window text color to equal the current text window back color before my commands run. Then after I am finished processing I restore the current text window text color to it's original value. It works great! The command statements do not show because the text and back colors are the same. Thanks Again. I would recommend this method to anyone who does not want the user to see the command prompts when some commands are running!
     
    thenov, Oct 20, 2004
    #14
  15. From the peanut gallery:
    Just don't forget to have error trapping that will always reset the text
    color in case the program stops with an error. Users would be pretty
    confused if the ACAD command line disappeared after they run your program.

    Good luck with the rest of your project,
    James


    text color to equal the current text window back color before my commands
    run. Then after I am finished processing I restore the current text window
    text color to it's original value. It works great! The command statements do
    not show because the text and back colors are the same. Thanks Again. I
    would recommend this method to anyone who does not want the user to see the
    command prompts when some commands are running!
     
    James Belshan, Oct 20, 2004
    #15
  16. if you want your users to not see the commands just to prevent the
    irritation of the user, it's ok.

    if you try to make the commands secure (means the user should not have
    permission to see it) then this method will not work. the user can mark
    the area with "white text", then copy&paste it into notepad and the
    whole output will be visible.

    in that case, you should use the acad-systemvariable "NOMUTT" instead.

    i don't have any idea on how to prevent the output of some commands
    including not to have Cr&Lf in the commandarea. that would be what i'm
    looking for.

    - alfred -
     
    Alfred NESWADBA, Oct 22, 2004
    #16
  17. thenov

    thenov Guest

    I just don't want the user to see the commands scrolling by while I am using the EATTEXT command in AutoCAD. During this time I am displaying a Progress Indicator form on Screen. This method seems to work for my purpose. Maybe there is a better way but I have yet to find it. Someone suggested using lisp to trap and send blanks to the screen but I did not want to go that route. I want to keep the entire Application in VBA. Any ideas would be helpful. Thanks!
     
    thenov, Oct 23, 2004
    #17
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.