Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How do I make this program not show any output to the command line?

  1. #1
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default How do I make this program not show any output to the command line?

    as the title of this thread states, I have tried everything I can think of: PRINC, and setting cmdecho to 0, but the output still occurs
    Code:
    (defun c:pg1 (/)
          (command "-psetupin" "page setup" "*")
          )
    Command: pg1

    Page setup "11X17" already exists, redefining.

    Page setup "11X17MS SAVIN B&W" already exists, redefining.

    Page setup "11X17MS SAVIN COLORCAD" already exists, redefining.

    Page setup "24X36" already exists, redefining.

    Page setup "24X36C" already exists, redefining.

    Page setup "24X36FILE" already exists, redefining.

    Page setup "24x36MS" already exists, redefining.

    Page setup "24x36MS-FILE" already exists, redefining.

    Page setup "24x36MS-PDF" already exists, redefining.

    Page setup "24X36PNG" already exists, redefining.

    Page setup "24x36PS" already exists, redefining.

    Page setup "24x36PS-PDF" already exists, redefining.

    Page setup "30x42MS" already exists, redefining.

    Page setup "30x42PS" already exists, redefining.

    Page setup "8x11MS SAVIN B&W" already exists, redefining.

    Page setup "8x11PS SAVIN B&W" already exists, redefining.

    Page setup "8X14PS SAVIN B&W" already exists, redefining.

    Page setup "PDF" already exists, redefining.

    Page setup "PDF24X36" already exists, redefining.

    Page setup "PDF8X11" already exists, redefining.

    Page setup "R11X17PS SAVIN B&W" already exists, redefining.

    Page setup "R11X17PS SAVIN COLORCAD" already exists, redefining.

    Page setup "WJI PDF 8X11" already exists, redefining.

    Page setup "WJI R8x11PS" already exists, redefining.

    Page setup "WJI24x36FILE" already exists, redefining.

    Page setup "WJI24x36PS" already exists, redefining.

    Page setup "WJI8X11PS" already exists, redefining.

  2. #2
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: How do I make this program not show any output to the command line?

    Rewrite it.

    Maybe ' notmutt ' system variable, but that might not even work. Be careful with this one though, so if you use it, make sure you have a good error handling routine that will put it back. 1 should show nothing at the command line.

  3. #3
    I could stop if I wanted to
    Join Date
    2005-09
    Location
    Canada
    Posts
    214
    Login to Give a bone
    0

    Default Re: How do I make this program not show any output to the command line?

    Maybe you will need to delete your page setup before..

    Code:
    ;;	DeletePageSetup						;;
    
    (defun c:DPS (/ actdoc PSetup layout PSlist)
    (vl-load-com)
      (setq actdoc (vla-get-activedocument (vlax-get-acad-object)))
      (vlax-map-collection
       (vla-get-plotconfigurations actdoc)
       '(lambda (x) (setq PSlist (cons (vla-get-name x) PSlist)))
      )   
    (if PSlist
      (progn
        (setq PSlist   (reverse PSlist)
              actdoc   (vla-get-ActiveDocument (vlax-get-Acad-Object))
              layout   (vla-get-Layout (vla-get-PaperSpace actdoc)) 
        ) 
      (vla-RefreshPlotDeviceInfo layout) 
      (vlax-for n (vla-get-Plotconfigurations actdoc) 
        (vla-delete n) 
      )
      (princ (strcat "\n Page Setups Deleted !"))  
    )
    (princ "\n No Page Setup Found !")
    )
    (princ)
    )
    Second solution....
    Use the code up.. and insert your drawing like this:

    Code:
    (command "._insert" "pageSetup")(command)
    But this is a little radical and insert all PageSetup, Layer Linetype, blocks etc....
    be aware.


  4. #4
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: How do I make this program not show any output to the command line?

    Quote Originally Posted by andrea.andreetti View Post
    Maybe you will need to delete your page setup before..

    Code:
    ;;    DeletePageSetup                        ;;
    
    (defun c:DPS (/ actdoc PSetup layout PSlist)
    (vl-load-com)
      (setq actdoc (vla-get-activedocument (vlax-get-acad-object)))
      (vlax-map-collection
       (vla-get-plotconfigurations actdoc)
       '(lambda (x) (setq PSlist (cons (vla-get-name x) PSlist)))
      )   
    (if PSlist
      (progn
        (setq PSlist   (reverse PSlist)
              actdoc   (vla-get-ActiveDocument (vlax-get-Acad-Object))
              layout   (vla-get-Layout (vla-get-PaperSpace actdoc)) 
        ) 
      (vla-RefreshPlotDeviceInfo layout) 
      (vlax-for n (vla-get-Plotconfigurations actdoc) 
        (vla-delete n) 
      )
      (princ (strcat "\n Page Setups Deleted !"))  
    )
    (princ "\n No Page Setup Found !")
    )
    (princ)
    )
    Second solution....
    Use the code up.. and insert your drawing like this:

    Code:
    (command "._insert" "pageSetup")(command)
    But this is a little radical and insert all PageSetup, Layer Linetype, blocks etc....
    be aware.

    will it error if a page setup is current for a layout?

  5. #5
    I could stop if I wanted to
    Join Date
    2005-09
    Location
    Canada
    Posts
    214
    Login to Give a bone
    0

    Default Re: How do I make this program not show any output to the command line?

    Quote Originally Posted by ccowgill View Post
    will it error if a page setup is current for a layout?
    Nope...No error....it delete even your page setup is applied to a layout

  6. #6
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Arrow Re: How do I make this program not show any output to the command line?

    Quote Originally Posted by T.Willey View Post
    Maybe ' notmutt ' system variable, but that might not even work.
    Unfortunately, NOMUTT doesn't work. I really don't see any way to do this while still using the (command) function.
    R.K. McSwain | CAD Panacea |

  7. #7
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: How do I make this program not show any output to the command line?

    Quote Originally Posted by rkmcswain View Post
    Unfortunately, NOMUTT doesn't work. I really don't see any way to do this while still using the (command) function.
    That's what I thought. Thanks for the confirmation R.K..

  8. #8
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Question Re: How do I make this program not show any output to the command line?

    Quote Originally Posted by T.Willey View Post
    That's what I thought. Thanks for the confirmation R.K..
    Makes you wonder if the programmer of this feature wasn't aware of NOMUTT...? Maybe the command should have been written so that this feedback could have been suppressed by simply using the EXPERT sysvar.
    R.K. McSwain | CAD Panacea |

  9. #9
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: How do I make this program not show any output to the command line?

    Quote Originally Posted by rkmcswain View Post
    Makes you wonder if the programmer of this feature wasn't aware of NOMUTT...? Maybe the command should have been written so that this feedback could have been suppressed by simply using the EXPERT sysvar.
    Actually, I've never understood why CmdEcho=0 isn't fully honored. Expert should affect messages when the command is executed by non-API methods, but IMHO, if I'm using an API the messages should not appear if CmdEcho=0.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  10. #10
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: How do I make this program not show any output to the command line?

    Quote Originally Posted by ccowgill View Post
    as the title of this thread states, I have tried everything I can think of: PRINC, and setting cmdecho to 0, but the output still occurs
    Code:
    (defun c:pg1 (/)
          (command "-psetupin" "page setup" "*")
          )
    Use the API to CopyFrom the PlotConfigurations collection.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

Page 1 of 2 12 LastLast

Similar Threads

  1. 2014: Would like COMMAND to show on command line
    By bradc699270 in forum AutoCAD General
    Replies: 0
    Last Post: 2015-05-01, 06:43 PM
  2. How Do Make A Duct or Pipe show in Single Line
    By r_pungitore in forum Revit MEP - General
    Replies: 3
    Last Post: 2010-03-29, 03:56 PM
  3. change the number of lines that show up in the command line?
    By smooth shoes in forum AutoCAD General
    Replies: 4
    Last Post: 2007-02-01, 09:50 PM
  4. show user form from a command line argument
    By lambertm in forum VBA/COM Interop
    Replies: 1
    Last Post: 2004-11-30, 09:36 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
  •