Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_bbcode.php on line 2083
PlotDwgs, a plot utility program - Page 5
Page 5 of 7 FirstFirst ... 34567 LastLast
Results 41 to 50 of 61

Thread: PlotDwgs, a plot utility program

  1. #41

    Post PlotDwgs, metric version

    I have just completed the metric version of PlotDwgs. I removed changes in the ltscale while plotting in this version. For those who may be interested in Beta Testing this new metric version just download the following files. After loading PlotDwgsMetric, type PD or PlotDwgs to run the program. There is a list near the top of the file that needs to be configured for your printers and plotters and paper sizes. Thanks to NukeCad and a few others for their help.
    Regards,
    Terry

    http://web2.airmail.net/terrycad/LIS...DwgsMetric.lsp
    http://web2.airmail.net/terrycad/LISP/PlotDwgs.dcl
    http://web2.airmail.net/terrycad/LISP/PlotDwgs.dvb

  2. #42
    Join Date
    Oct 2008
    Posts
    5
    Quote Originally Posted by Terry Cadd View Post
    I have just completed the metric version of PlotDwgs. I removed changes in the ltscale while plotting in this version. For those who may be interested in Beta Testing this new metric version just download the following files. After loading PlotDwgsMetric, type PD or PlotDwgs to run the program. There is a list near the top of the file that needs to be configured for your printers and plotters and paper sizes. Thanks to NukeCad and a few others for their help.
    Regards,
    Terry

    http://web2.airmail.net/terrycad/LIS...DwgsMetric.lsp
    http://web2.airmail.net/terrycad/LISP/PlotDwgs.dcl
    http://web2.airmail.net/terrycad/LISP/PlotDwgs.dvb
    Dear Terry,

    thanks for the metric lisp.
    when I plot with the new lisp this error appear:

    Unknown command "M". Press F1 for help.
    Unknown command "L". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "E". Press F1 for help.
    Unknown command "F". Press F1 for help.
    Unknown command "C". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "AMIRAL_PDF.CTB". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "PD". Press F1 for help.
    Unknown command "N". Press F1 for help.
    Unknown command "N". Press F1 for help.
    Unknown command "Y". Press F1 for help.


    but when i change MediaSize$ to "A2" or "A3" or "A4" in the line:
    (command "-PLOT" "Y" Layout$ PlotDevice$ MediaSize$ "M" Orientation$ Flip$ "E" "F" Offset$ "Y" PlotStyle$ "Y" "" "N" "N" "Y")

    this error doesn't appear and the plot work correctly.

    Please help me what is the wronge in the mediasize$

  3. #43
    Hi,
    You can change the "A3-Size" to "A3" in the AutoLISP code, but first read this.
    In the notes near the top of the AutoLISP file you will find the following line:
    ; The Paper Size must be "A4-Size", "A3-Size", "A2-Size", "A1-Size", or "A0-Size".
    In the following example notice that "A3-Size" is the display name in the list of choices,
    and that it actually uses the media size "A3 (297 x 420 mm)".
    Code:
      ((member *LoginName$ (list "ENGMGR" "ENGSEC"));AutoCAD department 1
        (setq *PlotterInfo@ (list    ;Varable Names ;Usage and Specifications
          (list "Printer"            ;Icon$         ;Icon, Printer or Plotter
                "HP LaserJet"        ;Plotter$      ;Plotter Display Name
                "\\\\MAIN\\DRAFTING" ;PlotDevice$   ;Plot Device Name, per available choices
                "A3-Size"            ;PaperSize$    ;Paper Size, A4-Size thru A0-Size
                "A3 (297 x 420 mm)"  ;MediaSize$    ;Media Size, per available choices
                "Y"                  ;Flip$         ;Flip Plot, Y or N
                "C"                  ;Offset$       ;Offset, C or x,y coordinates
                "A1-Size"            ;PaperSize$    ;Paper Size, A4-Size thru A0-Size
                "A1 (594 x 841 mm)"  ;MediaSize$    ;Media Size, per available choices
                "N"                  ;Flip$         ;Flip Plot, Y or N
                "0,0"                ;Offset$       ;Offset, C or x,y coordinates
                ;Add information for other metric sizes as required per plotter.
          );list
          ;Add additional plotter lists as required per each AutoCAD department.
        ));list;setq
        (setq *PlotStyles@ (list "Draft.ctb" "Final.ctb" "Generic.ctb"));Revise as required.
      );case
    If you search further in the AutoLISP file for "-Size" you will find the following sections of code:
    Code:
      (setq Layouts@ (cons "Window" (cons "Model" (cons "Model and layouts" (cons "All layouts" (GetLayoutList)))))
            Copies@ (list "1" "2" "3" "4" "5" "" "Other")
            PlotStyles@ *PlotStyles@
            Drawings@ (list "Current Drawing" "All open Drawings" "Folder of Drawings")
            Sizes@ (list "A4-Size" "A3-Size" "A2-Size" "A1-Size" "A0-Size")
            Ctab$ (getvar "CTAB")
      );setq
    Code:
      (setq Layout$       (nth 1 *PlotDwgs@)
            Copies# (atoi (nth 2 *PlotDwgs@))
            PaperSize$    (nth 3 *PlotDwgs@)
            MediaSize$    (nth 4 *PlotDwgs@)
            PlotDevice$   (nth 6 *PlotDwgs@)
            PlotStyle$    (nth 7 *PlotDwgs@)
            Reverse$      (nth 9 *PlotDwgs@)
            Sizes@ (list "A4-Size" "A3-Size" "A2-Size" "A1-Size" "A0-Size")
      );setq
    Code:
      (cond;Make adjustments as required
        ( (> Widest~ 841) "A0-Size")
        ( (> Widest~ 594) "A1-Size")
        ( (> Widest~ 420) "A2-Size")
        ( (> Widest~ 297) "A3-Size")
        (t "A4-Size")
      );cond
    Please note that you are welcome to change the display names from "A3-Size" to "A3" etc.
    All you have to do is search for the sections of code above and remove the "-Size" from the code.

    Best regards,
    Terry

  4. #44
    Join Date
    Oct 2008
    Posts
    5
    Dear Terry,

    for your info. I use autocad2006
    when I plot with the same error appear:

    Unknown command "M". Press F1 for help.
    Unknown command "L". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "E". Press F1 for help.
    Unknown command "F". Press F1 for help.
    Unknown command "C". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "AMIRAL_PDF.CTB". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "PD". Press F1 for help.
    Unknown command "N". Press F1 for help.
    Unknown command "N". Press F1 for help.
    Unknown command "Y". Press F1 for help.

    but when i change MediaSize$ to "A2" or "A3" or "A4" in the line:
    (command "-PLOT" "Y" Layout$ PlotDevice$ MediaSize$ "M" Orientation$ Flip$ "E" "F" Offset$ "Y" PlotStyle$ "Y" "" "N" "N" "Y")

    this error doesn't appear and the plot work correctly.

    Please help me what is the wronge in the mediasize$

  5. #45
    Join Date
    Jan 2008
    Location
    English Lake District
    Posts
    2,969
    It could be that the plotting command line sequence input for 2006 has changed.

    I have found this before with button macros that I wrote for sending a plot with one click of a toolbar button.
    The required sequence of inputs on the command line changed with 2006 and I had to write a second version of the macros.

    Not sure which version this lisp was written for, but this difference may be your problem.
    Im intelligent enough to know that I dont know everything; but I'll tell you all about it anyway.

  6. #46
    Ahmed,
    I am currently using 2006 and 2010. I think from your error screen that the "M" in the function PlotLayout may be the problem.
    In the code for PlotLayout change the following code:
    Code:
          (if (> Widest~ 0)
            (command "-PLOT" "Y" Layout$ PlotDevice$ MediaSize$ "M" Orientation$ Flip$ "E" "F" Offset$ "Y" PlotStyle$ "Y" "" "N" "N" "Y")
            (princ "\nNothing to plot on layout Model.")
          );if
        );progn
        (command "-PLOT" "Y" Layout$ PlotDevice$ MediaSize$ "M" Orientation$ Flip$ "E" "F" Offset$ "Y" PlotStyle$ "Y" "N" "N" "N" "N" "N" "Y")
    To this code with the "M" changed to just "".
    Code:
          (if (> Widest~ 0)
            (command "-PLOT" "Y" Layout$ PlotDevice$ MediaSize$ "" Orientation$ Flip$ "E" "F" Offset$ "Y" PlotStyle$ "Y" "" "N" "N" "Y")
            (princ "\nNothing to plot on layout Model.")
          );if
        );progn
        (command "-PLOT" "Y" Layout$ PlotDevice$ MediaSize$ "" Orientation$ Flip$ "E" "F" Offset$ "Y" PlotStyle$ "Y" "N" "N" "N" "N" "N" "Y")
    If this does not solve it can you paste the few lines that you customized near the top of the file so I can see if it is in the correct format?
    The one that looks like the following:
    Code:
      ((member *LoginName$ (list "ENGMGR" "ENGSEC"));AutoCAD department 1
        (setq *PlotterInfo@ (list    ;Varable Names ;Usage and Specifications
          (list "Printer"            ;Icon$         ;Icon, Printer or Plotter
                "HP LaserJet"        ;Plotter$      ;Plotter Display Name
                "\\\\MAIN\\DRAFTING" ;PlotDevice$   ;Plot Device Name, per available choices
                "A3-Size"            ;PaperSize$    ;Paper Size, A4-Size thru A0-Size
                "A3 (297 x 420 mm)"  ;MediaSize$    ;Media Size, per available choices
                "Y"                  ;Flip$         ;Flip Plot, Y or N
                "C"                  ;Offset$       ;Offset, C or x,y coordinates
                "A1-Size"            ;PaperSize$    ;Paper Size, A4-Size thru A0-Size
                "A1 (594 x 841 mm)"  ;MediaSize$    ;Media Size, per available choices
                "N"                  ;Flip$         ;Flip Plot, Y or N
                "0,0"                ;Offset$       ;Offset, C or x,y coordinates
                ;Add information for other metric sizes as required per plotter.
          );list
          ;Add additional plotter lists as required per each AutoCAD department.
        ));list;setq
        (setq *PlotStyles@ (list "Draft.ctb" "Final.ctb" "Generic.ctb"));Revise as required.
      );case
    Regards,
    Terry

  7. #47
    Join Date
    Nov 2009
    Posts
    1
    I'm getting the same problem, except instead of "M" at the tom I've got "CD"
    I've attached the first part of my LSP file, I'd be greatful if you could point out where I'm going wrong.

    (cond
    ((member *LoginName$ (list "RCS"));AutoCAD department 1
    (setq *PlotterInfo@ (list ;Varable Names ;Usage and Specifications
    (list "Printer" "R2-ESSO-OKI" "\\\\NDABLAGRAVE\\R2-ESSO-OKI" "A3-Size" "A3 (297 x 420 mm)" "N" "C" "A4-Size" "A4 (210 x 297 mm)" "N" "0,0"
    (setq *PlotStyles@ (list "lazer-lineweights.ctb" "lazer-lineweights-colour.ctb"));Revise as required.
    );case

    many thanks
    Rob.

    Quote Originally Posted by AHMED_PROFF View Post
    Dear Terry,

    thanks for the metric lisp.
    when I plot with the new lisp this error appear:

    Unknown command "M". Press F1 for help.
    Unknown command "L". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "E". Press F1 for help.
    Unknown command "F". Press F1 for help.
    Unknown command "C". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "AMIRAL_PDF.CTB". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "PD". Press F1 for help.
    Unknown command "N". Press F1 for help.
    Unknown command "N". Press F1 for help.
    Unknown command "Y". Press F1 for help.


    but when i change MediaSize$ to "A2" or "A3" or "A4" in the line:
    (command "-PLOT" "Y" Layout$ PlotDevice$ MediaSize$ "M" Orientation$ Flip$ "E" "F" Offset$ "Y" PlotStyle$ "Y" "" "N" "N" "Y")

    this error doesn't appear and the plot work correctly.

    Please help me what is the wronge in the mediasize$

  8. #48

    Post

    Hi all,
    Rob and I resolved this configuration issue through emails and I would like to add the following information for others to benefit from.
    He supplied me with several text screen captures plotting from the command line. One text screen example is at the end of this post.

    If you are plotting metric size download the metric version of the file PlotDwgs.lsp named PlotDwgsMetric.lsp below.
    The other two files PlotDwgs.dcl and PlotDwgs.dvb are also needed but did not change.
    http://web2.airmail.net/terrycad/LIS...DwgsMetric.lsp
    I recommend placing the files in a folder in your AutoCAD search path.
    And if you have a file named AcadDoc.lsp place the line (load "PlotDwgsMetric") in the file.
    Since you are the only one using this file I removed all the COND statements in the top part of the code. It can be confusing to understand and there were a few unmatched parentheses in your version.
    If you want to add a co-worker just add their login name in all caps after your login name.
    i.e. To find your login name type (getvar "loginname") = "terry" but change it to all caps, because sometimes people type a mix of upper and lowercase letters in their login name.
    I'm hoping that this works for you. Also notice in Plot Device Name "\\\\ndablagrave\\R2-ESSO-OKI" in AutoLISP you have to add a "\" for every "\" in a string shown on the flip screen.
    I was able to use your txt file to configure a fresh copy of PlotDwgsMetric.lsp.

    Best Regards,
    Terry

    Code:
    Command: -PLOT
    Detailed plot configuration? [Yes/No] <No>: y
    Enter a layout name or [?] <Model>:
    Enter an output device name or [?] <\\ndablagrave\R2-ESSO-OKI>:  <- PlotDevice$
    Enter paper size or [?] <A3>:                                    <- MediaSize$
    Enter paper units [Inches/Millimeters] <Inches>: m
    Enter drawing orientation [Portrait/Landscape] <Landscape>:
    Plot upside down? [Yes/No] <No>:                                 <- Flip$
    Enter plot area [Display/Extents/Limits/View/Window] <Extents>:
    Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit] <Fit>:
    Enter plot offset (x,y) or [Center] <Center>:                    <- Offset$
    Plot with plot styles? [Yes/No] <Yes>:
    Enter plot style table name or [?] (enter . for none) <lazer-lineweights.ctb>:  <- *PlotStyles@
    Plot with lineweights? [Yes/No] <Yes>:
    Enter shade plot setting [As displayed/Wireframe/Hidden/Visual styles/Rendered] <As displayed>:
    Write the plot to a file [Yes/No] <N>:
    Save changes to page setup [Yes/No]? <N>
    Proceed with plot [Yes/No] <Y>:
    Attached Thumbnails Attached Thumbnails AutoCAD_Search_Path.jpg  

  9. #49
    Join Date
    Jan 2008
    Location
    English Lake District
    Posts
    2,969
    Terry; thanks for reminding me about the "\\\\......".

    I have been trying to access a plotter at another office (about 200 miles away) whose driver is on the server at that office and knew that I has to do something with the delimiters but couldnt remember what it was and couldnt find the old post that I knew had the answer.

    Thanks again, I will make a note of it this time.
    Im intelligent enough to know that I dont know everything; but I'll tell you all about it anyway.

  10. #50
    Join Date
    Oct 2008
    Posts
    5

    Exclamation what's wronge with me?

    Quote Originally Posted by Terry Cadd View Post
    Hi all,
    Rob and I resolved this configuration issue through emails and I would like to add the following information for others to benefit from.
    He supplied me with several text screen captures plotting from the command line. One text screen example is at the end of this post.

    If you are plotting metric size download the metric version of the file PlotDwgs.lsp named PlotDwgsMetric.lsp below.
    The other two files PlotDwgs.dcl and PlotDwgs.dvb are also needed but did not change.
    http://web2.airmail.net/terrycad/LIS...DwgsMetric.lsp
    I recommend placing the files in a folder in your AutoCAD search path.
    And if you have a file named AcadDoc.lsp place the line (load "PlotDwgsMetric") in the file.
    Since you are the only one using this file I removed all the COND statements in the top part of the code. It can be confusing to understand and there were a few unmatched parentheses in your version.
    If you want to add a co-worker just add their login name in all caps after your login name.
    i.e. To find your login name type (getvar "loginname") = "terry" but change it to all caps, because sometimes people type a mix of upper and lowercase letters in their login name.
    I'm hoping that this works for you. Also notice in Plot Device Name "\\\\ndablagrave\\R2-ESSO-OKI" in AutoLISP you have to add a "\" for every "\" in a string shown on the flip screen.
    I was able to use your txt file to configure a fresh copy of PlotDwgsMetric.lsp.

    Best Regards,
    Terry

    Code:
    Command: -PLOT
    Detailed plot configuration? [Yes/No] <No>: y
    Enter a layout name or [?] <Model>:
    Enter an output device name or [?] <\\ndablagrave\R2-ESSO-OKI>:  <- PlotDevice$
    Enter paper size or [?] <A3>:                                    <- MediaSize$
    Enter paper units [Inches/Millimeters] <Inches>: m
    Enter drawing orientation [Portrait/Landscape] <Landscape>:
    Plot upside down? [Yes/No] <No>:                                 <- Flip$
    Enter plot area [Display/Extents/Limits/View/Window] <Extents>:
    Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit] <Fit>:
    Enter plot offset (x,y) or [Center] <Center>:                    <- Offset$
    Plot with plot styles? [Yes/No] <Yes>:
    Enter plot style table name or [?] (enter . for none) <lazer-lineweights.ctb>:  <- *PlotStyles@
    Plot with lineweights? [Yes/No] <Yes>:
    Enter shade plot setting [As displayed/Wireframe/Hidden/Visual styles/Rendered] <As displayed>:
    Write the plot to a file [Yes/No] <N>:
    Save changes to page setup [Yes/No]? <N>
    Proceed with plot [Yes/No] <Y>:
    Dear Terry,

    When I plot with the new metric lisp the following message appear
    Unknown command "PD". Press F1 for help.
    Unknown command "L". Press F1 for help.
    Unknown command "N". Press F1 for help.
    Unknown command "E". Press F1 for help.
    Unknown command "F". Press F1 for help.
    Unknown command "C". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "AMIRAL_A2.CTB". Press F1 for help.
    Unknown command "Y". Press F1 for help.
    Unknown command "PD". Press F1 for help.
    Unknown command "N". Press F1 for help.
    Unknown command "N". Press F1 for help.
    Unknown command "Y". Press F1 for help.

    code:
    HTML Code:
    ;-------------------------------------------------------------------------------
    (setq *LoginName$ (strcase (getvar "LOGINNAME")));LoginName in all caps
    (cond
      ((member *LoginName$ (list "ENGMGR" "ENGSEC"));AutoCAD department 1
        (setq *PlotterInfo@ (list    ;Varable Names ;Usage and Specifications
          (list "Printer"            ;Icon$         ;Icon, Printer or Plotter
                "HP LaserJet"        ;Plotter$      ;Plotter Display Name
                "\\\\MAIN\\DRAFTING" ;PlotDevice$   ;Plot Device Name, per available choices
                "A3-Size"            ;PaperSize$    ;Paper Size, A4-Size thru A0-Size
                "A3 (297 x 420 mm)"  ;MediaSize$    ;Media Size, per available choices
                "Y"                  ;Flip$         ;Flip Plot, Y or N
                "C"                  ;Offset$       ;Offset, C or x,y coordinates
                "A1-Size"            ;PaperSize$    ;Paper Size, A4-Size thru A0-Size
                "A1 (594 x 841 mm)"  ;MediaSize$    ;Media Size, per available choices
                "N"                  ;Flip$         ;Flip Plot, Y or N
                "0,0"                ;Offset$       ;Offset, C or x,y coordinates
                ;Add information for other metric sizes as required per plotter.
          );list
          ;Add additional plotter lists as required per each AutoCAD department.
        ));list;setq
        (setq *PlotStyles@ (list "Draft.ctb" "Final.ctb" "Generic.ctb"));Revise as required.
      );case
      ((member *LoginName$ (list "JOHN" "PAUL" "GEORGE" "RINGO"));AutoCAD department 2
        (setq *PlotterInfo@ (list
          (list "Printer" "HP LaserJet"  "\\\\MAIN\\DRAFTING"
            "A4-Size" "A4 (210 x 297 mm)" "Y" "C"
            "A3-Size" "A3 (297 x 420 mm)" "Y" "C")
          (list "Printer" "Xerox Copier" "\\\\MAIN\\Xerox WorkCentre DRAFTING"
            "A4-Size" "A4 (210 x 297 mm)" "Y" "C"
            "A3-Size" "A3 (297 x 420 mm)" "Y" "C")
          (list "Plotter" "HP DesignJet" "\\\\MAIN\\HP DesignJet 500 24 by HP"
            "A2-Size" "A2 (420 x 594 mm)" "Y" "0,0"
            "A1-Size" "A1 (594 x 841 mm)" "Y" "0,0")
        ));list;setq
        (setq *PlotStyles@ (list "Check.ctb" "Draft.ctb" "Final.ctb"));Revise as required.
      );case
      (t ;AutoCAD users not yet included in the above groups
        (setq *PlotterInfo@ (list
          (list "Printer" "EGCAIOFFP0002" "\\\\EGCAIOFFA0006\\EGCAIOFFP0002"
            "A4-Size" "A4 (210 x 297 mm)" "N" "C"
            "A3-Size" "A3 (297 x 420 mm)" "N" "C")
          (list "Plotter" "EGCAIOFFP0004" "\\\\EGCAIOFFA0006\\EGCAIOFFP0004"
            "A4-Size" "A4 (210 x 297 mm)" "N" "C"
            "A3-Size" "A3 (297 x 420 mm)" "N" "C"
            "A2-Size" "A2 (420 x 594 mm)" "N" "0,0"
            "A1-Size" "A1 (594 x 841 mm)" "N" "0,0")
        ));list;setq
        (setq *PlotStyles@ (list "Amiral_A2.ctb" "Generic.ctb" "Final.ctb" "monochrome.ctb"));Revise as required.
      );case
    );cond
    I think there is an error with mediasize$ which made this problem.
    Please advise.

Page 5 of 7 FirstFirst ... 34567 LastLast

Posting Permissions

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