I did manage to figure out the alternative - which is renaming already created file:Code - Auto/Visual Lisp: [Select]
Here's a quick example:Code - Auto/Visual Lisp: [Select]
) ) ) "_.-plot" "_Y" ;; Detailed plot configuration? [Yes/No]: "" ;; Enter a layout name <Current-Layout>: "DWG To PDF.pc3" ;; Enter an output device name: "ISO full bleed A4 (297.00 x 210.00 MM)" ;; Enter paper size: "_M" ;; Enter paper units [Inches/Millimeters]: "_L" ;; Enter drawing orientation [Portrait/Landscape]: "_N" ;; Plot upside down? [Yes/No]: "_E" ;; Enter plot area [Display/Extents/Limits/View/Window]: "_F" ;; Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <1=1>: "_C" ;; Enter plot offset (x,y) or [Center]: "_Y" ;; Plot with plot styles? [Yes/No]: "monochrome.ctb" ;; Enter plot style table name (enter . for none): "_Y" ;; Plot with lineweights? [Yes/No]: "_N" ;; Scale lineweights with plot scale? [Yes/No]: "_N" ;; Plot paper space first? [Yes/No]: "_N" ;; Hide paperspace objects? [Yes/No]: "_N" ;; Save changes to page setup [Yes/No]: "_Y" ;; Proceed with plot [Yes/No]: ) ) ) ;; Unique Filename - Lee Mac ;; Returns a filename suffixed with the smallest integer required for uniqueness ) (fnsplitl fnm) ) ) fnm )
with this code, how to change paper size to A3, because i wanted to change it to A3?
"ISO full bleed A4 (297.00 x 210.00 MM)" ;; Enter paper size:
Anyway, might be handy for someone:Code - Auto/Visual Lisp: [Select]
; Preffix / Suffix (trim or not) multiple filenames ; Written by Grrr ; Credits to: Lee Mac ; Requires (LM:getfiles) (defun C:test ( / tgassoc PrefixSuffixFileName *error* dcl des dch dcf ext L pref suf trimpref trimsuf ) ; Toggle associator - connect toggle value (0 or 1) with symbol value (nil or T): ; This subfunction still has troubles: ; _$ (vl-string-left-trim "ring" "ringingrings") -> "s" (vl-file-rename filepath ( path fnm ext / nfnm ) ); lambda ); function (fnsplitl filepath) ); apply ); vl-file-rename ); defun PrefixSuffixFileName ); defun *error* (cond ( (not '("PrefSufFileNames : dialog " "{ label = \"Prefix/Suffix FileNames\";" " : column" " { children_alignment = centered; children_fixed_width = true; width = 16;" " : row " " { children_alignment = centered;" " : edit_box { key = \"pref\"; label = \"Prefix\"; mnemonic = \"P\"; width = 12; edit_width = 12; }" " : toggle { key = \"trimpref\"; label = \"Trim\"; }" " }" " : row " " { children_alignment = centered;" " : edit_box { key = \"suff\"; label = \"Suffix\"; mnemonic = \"S\"; width = 12; edit_width = 12; }" " : toggle { key = \"trimsuf\"; label = \"Trim\"; }" " }" " spacer;" " : edit_box { key = \"ext\"; label = \"Extension\"; mnemonic = \"E\"; width = 4; edit_width = 4; }" " : button { key = \"f\"; label = \"Choose Files >>\"; mnemonic = \"F\"; }" " }" " spacer; ok_cancel; : text { key = \"error\"; }" "}" ); list ); mapcar ); and ); not ) ( '(cond ); cond ); vl-prin1-to-string ); action_tile "f" '(cond (cond ); cond ) ) ); cond ); vl-prin1-to-string ); action_tile ); progn ) ); cond ); defun
Man I was wondering about something, and ended up with something else completely different.
EDIT: Uploaded new version - with trim options, the PrefixSuffixFileName subfunction is not perfect as Lee mentioned.
Hi Grrr1337
Can you upload a Gif demo ?
Hi Grrr1337
Can you upload a Gif demo ?
Yeah.. my demo kinda sucks, sorry: