<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Lisp wont load into AutoCAD in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796289#M13509</link>
    <description>&lt;P&gt;Could i do the initget before the first setq? Then set the file_name variable using getkword? That way all the variables are being set in one single setq parenthesis? Or does it need to be in its own setq parenthesis?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just trying to keep things as simple as possible. I think this way gets rid of like 3 or 4 lines. Not sure if it actually works though. See example below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:lolplot()	
(initget "PLAN ELEC DATA PROP RIG")
(setq
	file_name (setq keyword (getkword "[Plan/Elec/Data/Prop/Rig]: &amp;lt;Plan&amp;gt;"))
	file_path (createlolfolder)
	dwg_name (vl-string-right-trim ".dwg" (getvar 'DWGNAME))
) ; setq
	(layerstate-restore file_name)
	(lolplotfun (strcat file_path "\\" dwg_name " - " filename)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2024 18:32:07 GMT</pubDate>
    <dc:creator>christian_paulsen98V29</dc:creator>
    <dc:date>2024-05-24T18:32:07Z</dc:date>
    <item>
      <title>Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796208#M13504</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;;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 &amp;lt;&amp;gt;
      "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 &amp;lt;&amp;gt;
      "Yes"                                     ;; Save changes to page setup [Yes/No]?
      "Yes"                                     ;; Proceed with plot [Yes/No] &amp;lt;Y&amp;gt;:
    )
)

;;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]: &amp;lt;Plan&amp;gt;"))
	(layerstate-restore file_name)
	(lolplotfun (strcat file_path "\\" dwg_name " - " filename)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 24 May 2024 17:56:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796208#M13504</guid>
      <dc:creator>christian_paulsen98V29</dc:creator>
      <dc:date>2024-05-24T17:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796222#M13505</link>
      <description>&lt;P&gt;And the error is...?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like you are trying to set values into variables without (setq) functions to do it with, at lines 43, 44, &amp;amp; 46, &lt;STRONG&gt;and&lt;/STRONG&gt; are missing a closing right parenthesis on line 48.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if I'm reading it right, line 3 should have fullfilename as an &lt;STRONG&gt;&lt;EM&gt;argument, before&lt;/EM&gt;&lt;/STRONG&gt; the slash.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun lolplotfun (fullfilename)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[No slash is needed if there are no localized variables to list after it.]&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:25:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796222#M13505</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-05-24T18:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796227#M13506</link>
      <description>&lt;P&gt;This is copied straight off the command line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command: APPLOAD&lt;BR /&gt;LOL FULL PLOT LISP.lsp successfully loaded.&lt;BR /&gt;Command: ; error: malformed list on input&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:04:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796227#M13506</guid>
      <dc:creator>christian_paulsen98V29</dc:creator>
      <dc:date>2024-05-24T18:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796245#M13507</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15502947"&gt;@christian_paulsen98V29&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;....: ; error: malformed list on input&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That usually means a parentheses problem.&amp;nbsp; See Message 2 again -- I added to it.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:10:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796245#M13507</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-05-24T18:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796258#M13508</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;stated you are missing setq statements here:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:lolplot()	
(setq
	file_path (createlolfolder)
	dwg_name (vl-string-right-trim ".dwg" (getvar 'DWGNAME))
) ; setq
	(initget "PLAN ELEC DATA PROP RIG")
(setq
	file_name (setq keyword (getkword "[Plan/Elec/Data/Prop/Rig]: &amp;lt;Plan&amp;gt;"))
) ; setq
	(layerstate-restore file_name)
	(lolplotfun (strcat file_path "\\" dwg_name " - " filename)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;And then your loloplotfun has filename argument so no slash:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun lolplotfun ( fullfilename)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:17:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796258#M13508</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-05-24T18:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796289#M13509</link>
      <description>&lt;P&gt;Could i do the initget before the first setq? Then set the file_name variable using getkword? That way all the variables are being set in one single setq parenthesis? Or does it need to be in its own setq parenthesis?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just trying to keep things as simple as possible. I think this way gets rid of like 3 or 4 lines. Not sure if it actually works though. See example below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:lolplot()	
(initget "PLAN ELEC DATA PROP RIG")
(setq
	file_name (setq keyword (getkword "[Plan/Elec/Data/Prop/Rig]: &amp;lt;Plan&amp;gt;"))
	file_path (createlolfolder)
	dwg_name (vl-string-right-trim ".dwg" (getvar 'DWGNAME))
) ; setq
	(layerstate-restore file_name)
	(lolplotfun (strcat file_path "\\" dwg_name " - " filename)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:32:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796289#M13509</guid>
      <dc:creator>christian_paulsen98V29</dc:creator>
      <dc:date>2024-05-24T18:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796293#M13510</link>
      <description>&lt;P&gt;Also, if you're going to offer a default value that someone can choose with Enter, you need to account for the possibility that &lt;EM&gt;they might do that:&lt;/EM&gt;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;    (setq file_name
      (cond
        ((getkword "[Plan/Elec/Data/Prop/Rig]: &amp;lt;Plan&amp;gt;"))
        ("Plan"); on Enter for listed default [returns nil above]
      ); cond
    ); setq&lt;/LI-CODE&gt;
&lt;P&gt;[You never use the 'keyword' variable.]&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:34:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796293#M13510</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-05-24T18:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796294#M13511</link>
      <description>&lt;P&gt;Yeah ive got that error before and like i said in the original post i figured it was some kind of extra bracket or a missing bracket. I can just never find out where the extra is or where one is missing. I looked through the code for like 10 minutes and didnt see the mistake.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you find where the malfunction is? I do all my coding in the notes app and theres no real way to format things or check for errors. I cant find a good code checker tool online. Sometimes i feel bad putting such simple stuff in the forums.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:35:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796294#M13511</guid>
      <dc:creator>christian_paulsen98V29</dc:creator>
      <dc:date>2024-05-24T18:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796299#M13512</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15502947"&gt;@christian_paulsen98V29&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Could i do the initget before the first setq? Then set the file_name variable using getkword? That way all the variables are being set in one single setq parenthesis? ....&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;....
	(lolplotfun (strcat file_path "\\" dwg_name " - " filename)
....&lt;/LI-CODE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes to the question.&amp;nbsp; And you're still missing the closing right parenthesis for that line of code.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:36:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796299#M13512</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-05-24T18:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796302#M13513</link>
      <description>&lt;P&gt;use a coder like the &lt;A href="https://code.visualstudio.com/" target="_blank" rel="noopener"&gt;one&lt;/A&gt; recommended by Autodesk &amp;amp; install the matching bracket extensions to help you locate errors like this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1716575885847.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1367180i697D45C038B4040B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="paullimapa_0-1716575885847.png" alt="paullimapa_0-1716575885847.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:38:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796302#M13513</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-05-24T18:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796307#M13514</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15502947"&gt;@christian_paulsen98V29&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;How do you find where the malfunction is? I do all my coding in the notes app and theres no real way to format things or check for errors. I cant find a good code checker tool online. Sometimes i feel bad putting such simple stuff in the forums.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I just looked for things to catch my eye.&amp;nbsp; For a more formal approach, investigate the&amp;nbsp;&lt;STRONG&gt;VLIDE&lt;/STRONG&gt;&amp;nbsp;command.&amp;nbsp; Others are better at it than I, but it's the diagnostic tool for this kind of thing.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:40:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796307#M13514</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-05-24T18:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796333#M13515</link>
      <description>&lt;P&gt;and here's using another vl function so you don't have to repeat the same initget &amp;amp; getkword options:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:lolplot(/ dwg_name file_name file_path msg)	
 (vl-load-com)
 (initget (setq msg "PLAN ELEC DATA PROP RIG"))
 (setq
  file_name (getkword (strcat "[" (vl-string-translate " " "/" msg)"] &amp;lt;PLAN&amp;gt;:"))
  file_path (createlolfolder)
  dwg_name (vl-string-right-trim ".dwg" (getvar 'DWGNAME))
 ) ; setq
 (if(not file_name)(setq file_name "PLAN"))
 (layerstate-restore file_name)
 (lolplotfun (strcat file_path "\\" dwg_name " - " filename))
) ; defun&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 18:58:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796333#M13515</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-05-24T18:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796389#M13516</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;LI-CODE lang="general"&gt;....
 (initget (setq msg "PLAN ELEC DATA PROP RIG"))
 (setq
  file_name (getkword (strcat "[" (vl-string-translate " " "/" msg)"] &amp;lt;PLAN&amp;gt;:"))
....&lt;/LI-CODE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;With &lt;STRONG&gt;two options starting with P&lt;/STRONG&gt;, I would do the initial-capitals approach the way all AutoCAD commands with options are built [whether you construct it as above or just spell it all out, which is actually shorter in this case]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;....
  (initget "Plan Elec Data PRop Rig")
  (setq
    file_name
      (cond
        ((getkword "[Plan/Elec/Data/PRop/Rig]: &amp;lt;Plan&amp;gt;"))
        ("Plan"); on Enter for listed default [returns nil above]
      ); cond
....&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That way, if you choose to type an option [rather than accept the default or pick one at the prompt line], you can type just &lt;STRONG&gt;P&lt;/STRONG&gt; to get Plan [apparently expected to be the more common option], and &lt;STRONG&gt;PR&lt;/STRONG&gt; for PRop, whereas with the all-capitals approach if you type just &lt;STRONG&gt;P&lt;/STRONG&gt; &lt;EM&gt;it will ask you whether you meant PLAN or PROP&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 19:37:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796389#M13516</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-05-24T19:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796404#M13517</link>
      <description>&lt;P&gt;and with &lt;STRONG&gt;Dynmode&lt;/STRONG&gt; set to &lt;STRONG&gt;1&lt;/STRONG&gt; or &lt;STRONG&gt;3&lt;/STRONG&gt; you'll get the popup menu selection when the cursor moves into the drawing area:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1716579763867.png" style="width: 696px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1367194iAFF0E05DE13F4B7E/image-dimensions/696x136?v=v2" width="696" height="136" role="button" title="paullimapa_0-1716579763867.png" alt="paullimapa_0-1716579763867.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 19:44:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796404#M13517</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-05-24T19:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796644#M13518</link>
      <description>&lt;P&gt;Got kinda busy and had some work to do. Just looked at your guys notes, made some changes, simplified a few things. It worked but then i didnt like the way the folders were being named so i tried to change that and now autocad crashes everytime i try to use the command. Any ideas?&lt;BR /&gt;&lt;BR /&gt;Updated code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;;DEFINE PLOT FUNCTION
(defun plotfunc (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 &amp;lt;&amp;gt;
      "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 &amp;lt;&amp;gt;
      "Yes"                                     ;; Save changes to page setup [Yes/No]?
      "Yes"                                     ;; Proceed with plot [Yes/No] &amp;lt;Y&amp;gt;:
    )
)

;;DEFINE FOLDER FUNCTION
(defun createfolder ( / foldername )
    (setq foldername (strcat (getvar 'DWGPREFIX) "\\PDF"))
    (if (not (vl-file-directory-p foldername))
       (vl-mkdir foldername)
    )
    foldername
)

;;MAIN ROUTINE
(defun c:qplot()	
	(initget "PLAN ELEC DATA LOCA RIG")
	(setq
	state (getkword "[Plan/Elec/Data/Loca/Rig]: &amp;lt;Plan&amp;gt;")
	file_path (createfolder)
	file_name (vl-string-right-trim ".dwg" (getvar 'DWGNAME))
	)
	(layerstate-restore state viewportId 4)
	(command "regen")
	(plotfunc (strcat file_path "\\" file_name " - " state))
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 24 May 2024 22:59:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796644#M13518</guid>
      <dc:creator>christian_paulsen98V29</dc:creator>
      <dc:date>2024-05-24T22:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp wont load into AutoCAD</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796663#M13519</link>
      <description>&lt;P&gt;Took out the "\\" before PDF when creating the folders. Works perfect now! Thank you everyone for your input.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 23:24:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-wont-load-into-autocad/m-p/12796663#M13519</guid>
      <dc:creator>christian_paulsen98V29</dc:creator>
      <dc:date>2024-05-24T23:24:23Z</dc:date>
    </item>
  </channel>
</rss>

