Message 1 of 16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone! I just made a similar post for a different lisp routine im working on. The other one error codes when putting in the command, this one errors out when even trying to load the lisp. Can anyone point out where i went wrong? I assume its like an extra bracket or something somewhere.
;;DEFINE PLOT FUNCTION
(defun lolplotfun ( / fullfilename)
(command
"-PLOT"
"Yes" ;; Detailed plot configuration? [Yes/No]
"Model" ;; Enter a layout name or [?]
"Autodesk PDF.pc3" ;; Enter an output device name or [?]
"ARCH expand D (36.00 x 24.00 Inches)" ;; Enter paper size or [?]
"Inches" ;; Enter paper units [Inches/Millimeters]
"Landscape" ;; Enter drawing orientation [Portrait/Landscape]
"No" ;; Plot upside down? [Yes/No]
"View" ;; Enter plot area [Display/Extents/Layout/View/Window]
"MS" ;; Enter view name <>
"Fit" ;; Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit]
"Center" ;; Enter plot offset (x,y) or [Center]
"Yes" ;; Plot with plot styles? [Yes/No]
"24x36.ctb" ;; Enter plot style table name or [?]
"Yes" ;; Plot with lineweights? [Yes/No]
"As displayed" ;; Enter shade plot setting [As displayed/legacy Wireframe/legacy Hidden/Visual styles/Rendered]
fullfilename ;; Enter file name <>
"Yes" ;; Save changes to page setup [Yes/No]?
"Yes" ;; Proceed with plot [Yes/No] <Y>:
)
)
;;DEFINE FOLDER FUNCTION
(defun createlolfolder ( / str_path str_name str_lol_folder )
(setq str_path (getvar 'DWGPREFIX)
str_name (vl-string-right-trim ".dwg" (getvar 'DWGNAME))
str_lol_folder (strcat str_path " - " str_name)
)
(if (not (vl-file-directory-p str_cnc_folder))
(vl-mkdir str_lol_folder)
)
str_lol_folder
)
;;MAIN ROUTINE
(defun c:lolplot()
file_path (createlolfolder)
dwg_name (vl-string-right-trim ".dwg" (getvar 'DWGNAME))
(initget "PLAN ELEC DATA PROP RIG")
file_name (setq keyword (getkword "[Plan/Elec/Data/Prop/Rig]: <Plan>"))
(layerstate-restore file_name)
(lolplotfun (strcat file_path "\\" dwg_name " - " filename)
)
Solved! Go to Solution.