<?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: Error when loading a script with lisp in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510082#M143786</link>
    <description>&lt;P&gt;here's is the vallist1 + some other linked Values's + The function i want to load in the script as last. any option i need to check, perhaps options that has impact on loading scripts? it's also on my server so does it isn't in a trusted folder? this morning i could open multiple drawings with the script, but i &amp;nbsp;realised i need to close dialog first so i did a rebuild.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getvaluelist1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun GetValList1 ( /  files Lines List1 filesL a First LinesL)

  (setq files (GetFiles))

  (setq Lines (Getlines))
  (setq LinesL (length Lines))

  (setq filesL (length files))
 

  

  (if (/= LinesL nil)
    (repeat filesL
      (setq First (car files))
      (if (member First Lines)
	(setq files (cdr files))
	(progn
	  (setq List1 (cons First List1))
	  (setq files (cdr files))
	  )
	)
      )
    (progn
      (setq List1 files)
    )
    )
  List1
  );Defun&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Get lines&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun Getlines ( / DWGprefix Externfolder TxtfileDir file Txtline Listtxt)

  (setq DWGprefix (getvar "dwgprefix"))
  (setq Externfolder (strcat DWGprefix "\\#Library-Do Not Edit#"))
  (setq TxtfileDir (strcat  Externfolder "\\BinDWGforPLANLIJST.txt" ))

  (if (findfile TxtfileDir)
    (progn
      ;; set and open file for reading
      (setq file (open  TxtfileDir  "R"))
      ;; each time you issue 'read-line' on a file, it will go to the next line,
      ;; so as long as it will allow me to read-line the file, it will define the value
      ;; to a variable...
      (while (setq Txtline (read-line file))
	;; value set as #Line, now I'll append it to a list eg. (list "A" "B" "C")
	(setq Listtxt (cons Txtline Listtxt))
	) ;_ while
      ;; close file
      (close file)
      ;; since I have to append from the front, my list is in reverse, so I just rearrange it.
      (setq Listtxt (reverse Listtxt))
      )
    nil
    )
) ;_ defun&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;getfiles&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun GetFiles ( / files file filelength filename filenamelst dcl_id ddiag)

  
  (setq DWGprefix (getvar "dwgprefix"))
  (setq files (vl-directory-files DWGprefix "*.dwg" ))
  (foreach x files
    (setq file x)
    (setq filelength (strlen file))
    (setq filelength (- filelength 4))
    (setq filename (substr file 1 filelength))
    (setq filenamelst (cons filename filenamelst))
    )
   )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:DISTRIBUTEEXCELPLANNLIJST ( / file Textblock Externfolder Activedoc DWGprefix Txtline Listtxt Blockname objs ss
				    Listtxt ListtxtL Li ListAttVal Att Attl Val itm blks)


  (setq Activedoc (vla-get-activedocument (vlax-get-acad-object)))
  (setq blks (vla-get-Blocks Activedoc))
  (setq DWGprefix (getvar "dwgprefix"))
  (setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#"))
  (setq Textblock (strcat Externfolder "\\BinTextExcelAviable.txt"))

  (setq file (open Textblock  "R"))
  (while (setq Txtline (read-line file))
      (setq Listtxt (cons Txtline Listtxt))
       
    )
  (close file)

  ;; since I have to append from the front, my list is in reverse, so I just rearrange it.
  (setq Listtxt (reverse Listtxt))


  (foreach x Listtxt
    (setq  Blockname (strcat x))
    (setq TextB (strcat Externfolder "\\" Blockname ".txt"))
    (setq fileB (open TextB "R"))
    (while (setq TxtBline (read-line fileB))
      (setq ListBtxt (cons TxtBline ListBtxt))
      )
    (close fileB)
    
    (setq ListAttVal nil)

    (setq ListBtxtL (/ (length ListBtxt) 2))
    (repeat ListBtxtL
      (setq Li (reverse(list (car ListBtxt) (cadr ListBtxt))))
      (Setq ListAttVal (cons Li ListAttVal))
      (setq ListBtxt (cdr (cdr ListBtxt)))
      )
		


    (foreach x ListAttVal
      (Setq Att (car x))
      (setq Attl  (strlen Att))
      (setq Attl  (- Attl 1 ))
      (setq Att (substr Att 1 Attl))

      (setq Val (cadr x))


      (if (tblsearch "block" Blockname)
      (progn
	(if (setq SS (ssget "_X" '((0 . "INSERT")(66  . 1))))
	  (vlax-for block (setq SetDoc (vla-get-ActiveSelectionSet Activedoc))
	    (if
	      (= (strcase (vlax-get-property block 'EffectiveName)) (strcase Blockname))
	      (progn

	  
		  (if  (setq itm (assoc
			       (strcase Att)
			       (mapcar(function(lambda (j)(list(vla-get-tagstring j)(vla-get-textstring j)j)))
				      (vlax-invoke block 'GetAttributes))))
		    (progn
		      (vla-put-textstring (last itm) Val)
		      )
		    
		  )
		  )
		  
		
		)
	      )
	    
	    )
	  )
	)

      )
      
    )
  (princ)
  )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Feb 2015 18:31:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-02-17T18:31:10Z</dc:date>
    <item>
      <title>Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5509826#M143781</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, i wrote a little lisp that write script and the activite it. If i check everything , the script and the txt blocks everything is right.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i keep getting a error on the point that i activate the command to script. error is attached, tried diffrent way's but no luck. The command (putexcelplanlijst) is actived as End of a dialog after done dialog.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun PUTEXCELPLANLIJST ( / dossval DWGprefix Externfolder script Drawings Drawing Files 
			  sf dossfile TextDoss)


  (setq DWGprefix (getvar "dwgprefix"))
  (setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#"))
  (setq TextDoss (strcat Externfolder "\\BinDossVal.txt"))



  (setq dossfile (open TextDoss  "R"))
  (setq  dossval (read-line dossfile))
  (close dossfile)





  (setq Drawings (GetValList1))
  (setq ThisDwg (strcat DWGprefix (getvar "dwgname")))
  (setq script (strcat Externfolder "\\BinOpenDWGforTitleblock.SCR"))

  (foreach x Drawings
    (setq Drawing (strcat DWGprefix x ".dwg"))
    (if (not(= Drawing  ThisDwg))
      (setq Files (cons Drawing Files))
      )
    )

  (if (&amp;gt; (length Files) 0)
	(progn
	  (setq sf (open script "w"))
	  (foreach dwg Files
	    (princ (strcat "\""dwg "\""))
	    (write-line "_.open" sf)
	    (write-line (strcat "\""dwg "\"") sf)
;;;	    (write-line "(load \"Dossier\")" sf)
;;;	    (write-line "c:DISTRIBUTEEXCELPLANNLIJST" sf)
	    (write-line "_.qsave" sf)
	    (write-line "_.close" sf)
	    )
;;;	  (write-line "Filedia" sf)
;;;	  (write-line "1" sf)
	  (close sf)
;;;	  (setvar "filedia" 0)
	  (command "script" "R:\5100-5199\5107 Vaneenoo Noirefontaine Hall 2\ACAD\#Library-Do Not Edit#\BinOpenDWGforTitleblock.SCR")
	  )
	(Alert (strcat "There is no dwg files in " path "!"))
	)
;;;
;;;        )
;;;    )
  (princ)
  )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 15:09:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5509826#M143781</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-17T15:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5509871#M143782</link>
      <description>&lt;P&gt;I read previeus things about SDI, it's now on zero.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also when i do this command, after i get that error, my right mousclick is redefined from minimenu to repeat command (with right mousebutton).&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is also not so good.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 15:40:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5509871#M143782</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-17T15:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5509914#M143783</link>
      <description>&lt;P&gt;Hi Subje,&lt;/P&gt;
&lt;P&gt;try to add a backslash at&lt;/P&gt;
&lt;P&gt;(setq Externfolder (strcat DWGprefix "&lt;FONT color="#ff0000"&gt;&lt;STRONG&gt;\&lt;/STRONG&gt;&lt;/FONT&gt;\#Library-Do Not Edit#"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(I didn't test the code...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 16:16:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5509914#M143783</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-17T16:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5509933#M143784</link>
      <description>&lt;P&gt;Hi henrique,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything good? So i did that change, put some princs in it but still the same error. Maybe it's something with the options of my cad?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;below commandline + revised code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to be honest this morning the script worked (the open en close part cause i was still building it), but this afternoon i was getting the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Command: DOSSIER
Command:
R:\5100-5199\5107 Vaneenoo Noirefontaine Hall 2\ACAD\\#Library-Do Not Edit#
R:\5100-5199\5107 Vaneenoo Noirefontaine Hall 2\ACAD\\#Library-Do Not Edit#\BinDossVal.txt
R:\5100-5199\5107 Vaneenoo Noirefontaine Hall 2\ACAD\\#Library-Do Not Edit#\BinOpenDWGforTitleblock.SCR
R:\5100-5199\5107 Vaneenoo Noirefontaine Hall 2\ACAD\\#Library-Do Not Edit#\BinOpenDWGforTitleblock.SCR
Command:
Command: &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun PUTEXCELPLANLIJST ( / dossval DWGprefix Externfolder script Drawings Drawing Files 
			  sf dossfile TextDoss)


  (setq DWGprefix (getvar "dwgprefix"))
  (setq Externfolder (strcat DWGprefix "\\#Library-Do Not Edit#"))
  (princ (strcat "\n" Externfolder))
  (setq TextDoss (strcat Externfolder "\\BinDossVal.txt"))
  (princ (strcat "\n" TextDoss))

  (setq dossfile (open TextDoss  "R"))
  (setq  dossval (read-line dossfile))
  (close dossfile)


  (if (= GetValList1 nil)
    (setq Drawings(GetFiles))
    (setq Drawings (GetValList1))
    )
 
  (setq ThisDwg (strcat DWGprefix (getvar "dwgname")))
  (setq script (strcat Externfolder "\\BinOpenDWGforTitleblock.SCR"))
  (princ (strcat "\n" script))


  (foreach x Drawings
    (setq Drawing (strcat DWGprefix x ".dwg"))
   
    (if (not(= Drawing ThisDwg))
      (setq Files (cons Drawing Files))
      )
    )
 

  (if (&amp;gt; (length Files) 0)
	(progn
	  (setq sf (open script "w"))
	  (foreach dwg Files
	    (write-line "_.open" sf)
	    (write-line (strcat "\""dwg "\"") sf)
;;;	    (write-line "(load \"Dossier\")" sf)
;;;	    (write-line "c:DISTRIBUTEEXCELPLANNLIJST" sf)
	    (write-line "_.qsave" sf)
	    (write-line "_.close" sf)
	    )
;;;	  (write-line "Filedia" sf)
;;;	  (write-line "1" sf)
	  (close sf)
	  (princ (strcat "\n" script))
	  (command "script" "R:\5100-5199\5107 Vaneenoo Noirefontaine Hall 2\ACAD\#Library-Do Not Edit#\BinOpenDWGforTitleblock.SCR")
	  )
	(Alert (strcat "No script found !"))
	)
;;;
;;;        )
;;;    )
  (princ)
  ); Defun&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 16:39:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5509933#M143784</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-17T16:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510041#M143785</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;Hi henrique,&lt;/P&gt;
&lt;P&gt;Everything good? So i did that change, put some princs in it but still the same error. Maybe it's something with the options of my cad?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi Subje, &lt;/P&gt;
&lt;P&gt;yes, everything good, &lt;SPAN class="hps"&gt;thank you&lt;/SPAN&gt;!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post the 'GetValList1' function?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 17:49:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510041#M143785</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-17T17:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510082#M143786</link>
      <description>&lt;P&gt;here's is the vallist1 + some other linked Values's + The function i want to load in the script as last. any option i need to check, perhaps options that has impact on loading scripts? it's also on my server so does it isn't in a trusted folder? this morning i could open multiple drawings with the script, but i &amp;nbsp;realised i need to close dialog first so i did a rebuild.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getvaluelist1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun GetValList1 ( /  files Lines List1 filesL a First LinesL)

  (setq files (GetFiles))

  (setq Lines (Getlines))
  (setq LinesL (length Lines))

  (setq filesL (length files))
 

  

  (if (/= LinesL nil)
    (repeat filesL
      (setq First (car files))
      (if (member First Lines)
	(setq files (cdr files))
	(progn
	  (setq List1 (cons First List1))
	  (setq files (cdr files))
	  )
	)
      )
    (progn
      (setq List1 files)
    )
    )
  List1
  );Defun&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Get lines&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun Getlines ( / DWGprefix Externfolder TxtfileDir file Txtline Listtxt)

  (setq DWGprefix (getvar "dwgprefix"))
  (setq Externfolder (strcat DWGprefix "\\#Library-Do Not Edit#"))
  (setq TxtfileDir (strcat  Externfolder "\\BinDWGforPLANLIJST.txt" ))

  (if (findfile TxtfileDir)
    (progn
      ;; set and open file for reading
      (setq file (open  TxtfileDir  "R"))
      ;; each time you issue 'read-line' on a file, it will go to the next line,
      ;; so as long as it will allow me to read-line the file, it will define the value
      ;; to a variable...
      (while (setq Txtline (read-line file))
	;; value set as #Line, now I'll append it to a list eg. (list "A" "B" "C")
	(setq Listtxt (cons Txtline Listtxt))
	) ;_ while
      ;; close file
      (close file)
      ;; since I have to append from the front, my list is in reverse, so I just rearrange it.
      (setq Listtxt (reverse Listtxt))
      )
    nil
    )
) ;_ defun&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;getfiles&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun GetFiles ( / files file filelength filename filenamelst dcl_id ddiag)

  
  (setq DWGprefix (getvar "dwgprefix"))
  (setq files (vl-directory-files DWGprefix "*.dwg" ))
  (foreach x files
    (setq file x)
    (setq filelength (strlen file))
    (setq filelength (- filelength 4))
    (setq filename (substr file 1 filelength))
    (setq filenamelst (cons filename filenamelst))
    )
   )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:DISTRIBUTEEXCELPLANNLIJST ( / file Textblock Externfolder Activedoc DWGprefix Txtline Listtxt Blockname objs ss
				    Listtxt ListtxtL Li ListAttVal Att Attl Val itm blks)


  (setq Activedoc (vla-get-activedocument (vlax-get-acad-object)))
  (setq blks (vla-get-Blocks Activedoc))
  (setq DWGprefix (getvar "dwgprefix"))
  (setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#"))
  (setq Textblock (strcat Externfolder "\\BinTextExcelAviable.txt"))

  (setq file (open Textblock  "R"))
  (while (setq Txtline (read-line file))
      (setq Listtxt (cons Txtline Listtxt))
       
    )
  (close file)

  ;; since I have to append from the front, my list is in reverse, so I just rearrange it.
  (setq Listtxt (reverse Listtxt))


  (foreach x Listtxt
    (setq  Blockname (strcat x))
    (setq TextB (strcat Externfolder "\\" Blockname ".txt"))
    (setq fileB (open TextB "R"))
    (while (setq TxtBline (read-line fileB))
      (setq ListBtxt (cons TxtBline ListBtxt))
      )
    (close fileB)
    
    (setq ListAttVal nil)

    (setq ListBtxtL (/ (length ListBtxt) 2))
    (repeat ListBtxtL
      (setq Li (reverse(list (car ListBtxt) (cadr ListBtxt))))
      (Setq ListAttVal (cons Li ListAttVal))
      (setq ListBtxt (cdr (cdr ListBtxt)))
      )
		


    (foreach x ListAttVal
      (Setq Att (car x))
      (setq Attl  (strlen Att))
      (setq Attl  (- Attl 1 ))
      (setq Att (substr Att 1 Attl))

      (setq Val (cadr x))


      (if (tblsearch "block" Blockname)
      (progn
	(if (setq SS (ssget "_X" '((0 . "INSERT")(66  . 1))))
	  (vlax-for block (setq SetDoc (vla-get-ActiveSelectionSet Activedoc))
	    (if
	      (= (strcase (vlax-get-property block 'EffectiveName)) (strcase Blockname))
	      (progn

	  
		  (if  (setq itm (assoc
			       (strcase Att)
			       (mapcar(function(lambda (j)(list(vla-get-tagstring j)(vla-get-textstring j)j)))
				      (vlax-invoke block 'GetAttributes))))
		    (progn
		      (vla-put-textstring (last itm) Val)
		      )
		    
		  )
		  )
		  
		
		)
	      )
	    
	    )
	  )
	)

      )
      
    )
  (princ)
  )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 18:31:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510082#M143786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-17T18:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510149#M143787</link>
      <description>&lt;P&gt;Henrique,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just noticed when testing the-last made script in commandbar i notice that works without error. but when i run it in lisp i got a error.&lt;/P&gt;&lt;P&gt;gonna check if i can get here a workaround.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 19:04:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510149#M143787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-17T19:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510166#M143788</link>
      <description>&lt;P&gt;Subje,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="gt-card-ttl-txt" style="direction: ltr;"&gt;firstly&lt;/SPAN&gt;, &lt;SPAN class="hps"&gt;my apologies&lt;/SPAN&gt; for &lt;SPAN class="hps alt-edited"&gt;misleading&lt;/SPAN&gt; you in my first post...&lt;/P&gt;
&lt;P&gt;you don't need to add an extra backslash at&lt;/P&gt;
&lt;P&gt;(setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#"))&lt;/P&gt;
&lt;P&gt;I did read the the code &lt;SPAN class="hps alt-edited"&gt;much too fast&lt;/SPAN&gt;, sorry... &lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://forums.autodesk.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did test the code, &lt;SPAN class="hps"&gt;without any error&lt;/SPAN&gt;, i just did repace the hardcoded script path for&lt;/P&gt;
&lt;P&gt;(command "script" script)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: I can't test the code in a server, because I'm at home, and with an oollddd laptop and an oolllddd AutoCAD...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 19:17:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510166#M143788</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-17T19:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510279#M143789</link>
      <description>&lt;P&gt;Henrique&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;no prob it's never bad to test things out. either way you know if it's for good or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok Update, i read your answer and continued testing. it could be the server or the dialog. And with the server no luck i put everything in trusted and everything what isn't trusted can enter to now :D.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i went on the dialog then and made some changes after 20 times.&amp;nbsp;&lt;/P&gt;&lt;P&gt;first off all the command was in the progress of the action key, so if you look bollow it's changed to a dialog number (althought that dialogsettings is a bermuda for me)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;second of all i took that command out of my 999st subfunction and made another function. Also in that one i changed command to command-s.&lt;/P&gt;&lt;P&gt;And now it's seem to be working. Thanks for the answer. My lisp has quite grow since last time right ;). but problaby not very clean :p. still need a lot of testing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i m actually thinking that command-s was prob the only thing i needed &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh i m sitting at home also, but i m working with teamviewer. otherwise i need to change all my folders and options in my default pc at home. for personal use it's free. it's no product of my so if it's against the violations of this forum i can always delete it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.teamviewer.com/en/index.aspx?pid=google.tv_exact.s.int&amp;amp;gclid=CNP96dPu6cMCFWTMtAod-C0A2A" target="_self"&gt;http://www.teamviewer.com/en/index.aspx?pid=google.tv_exact.s.int&amp;amp;gclid=CNP96dPu6cMCFWTMtAod-C0A2A&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:DOSSIER ( / value3 name Name1 Name2 Name3 Name4 ddiag activedocument
		  acadobject dcl_id name@ name# string Projectnaam Remember)

;;;--- Set Active document 
  (setq acadobject (vlax-get-acad-object))
  (setq activedocument (vla-get-activedocument acadobject))

;;;--- Make list Name
  (setq name '("DOSSIERNUMMER" "PROJECTNAAM" "AFK ELEMENT" "BETREFT1" "BETREFT2" "AANNEMER" "ADRESAANNEMER1" "ADRESAANNEMER2"
		"STRAATBOUWPLAATS" "POSTCODE" "BOUWPLAATS" "PROVINCIE" "BOUWHEER" "BOUWHEERADRES1" "BOUWHEERADRES2" "ARCHITECT"
		"ARCHITECTADRES1" "ARCHITECTADRES2" "BEK TEKENAAR" "WAP TEKENAAR" "VELLINGK. BALK.KOLOM" "VELLINGK. WAND" 
		"KWALITEIT BETON" "GEBRUIKSDOMEIN" "OMGEVINGSKLASSE" "CONSISTENTIEKLASSE" "KORRELAFM NOM." "MIN. DEKKING"
         ));SETQ
  (setq ddiag 4)

  (while (&amp;gt; ddiag 2)
  
;;;--- Load the dcl file from disk into memory
  (if(not(setq dcl_id (load_dialog "DOSSIER.dcl")))
    (progn
      (alert "The DCL file could not be loaded!")
      (exit)
    );PROGN
    
;;;--- Else, the dcl file was loaded into memory
    (progn
      
;;;--- Load the definition inside the DCL file
      (if (not(new_dialog "DOSSIER" dcl_id))
        (progn
        (alert "The DOSSIER definition could not be loaded!")
          (exit)
        );PROGN
    
;;;--- Else, the definition was loaded
        (progn

;;;--- Put mode tile gray for excel data
	  (Foreach x name
	    (setq name@ (strcat x "@"))
	    (mode_tile name@ 1)
	    );FOREACH
	  
	  (mode_tile "OPMERKING" 1)
	  (mode_tile "SelectAll" 1)
	  (mode_tile "SelectNone" 0)
	  
	  (foreach x name
	    
	    (setq name# (strcat x "#"))
	    (action_tile name# "(CheckSelect) (ToggleRow1)  (ToggleRow2)  (ToggleRow3)  (ToggleRow4)  (ToggleRow5)
	     (ToggleRow6)  (ToggleRow7)  (ToggleRow8)  (ToggleRow9) (ToggleRow10) (ToggleRow11)")
	    )

	  (action_tile "Selectrow1" "(GetRow1) (CheckSelect)")
	  (action_tile "Selectrow2" "(GetRow2) (CheckSelect)")
	  (action_tile "Selectrow3" "(GetRow3) (CheckSelect)")
	  (action_tile "Selectrow4" "(GetRow4) (CheckSelect)")
	  (action_tile "Selectrow5" "(GetRow5) (CheckSelect)")
	  (action_tile "Selectrow6" "(GetRow6) (CheckSelect)")
	  (action_tile "Selectrow7" "(GetRow7) (CheckSelect)")
	  (action_tile "Selectrow8" "(GetRow8) (CheckSelect)")
	  (action_tile "Selectrow9" "(GetRow9) (CheckSelect)")
	  (action_tile "Selectrow10" "(GetRow10) (CheckSelect)")
	  (action_tile "Selectrow11" "(GetRow11) (CheckSelect)")



	  (if Remember
	    (progn
	      (foreach x Remember
		(setq Name1 (car x)) ;;name customprop
		(if
		  (= (cadr x) "None")
		  (setq Name2 "")
		  (setq Name2 (cadr x))
		  );; custompropvalue
		(if
		  (= (caddr x) "None")
		  (setq Name3 "")
		  (setq Name3 (caddr x)) ;;excel value
		  )
		(setq Name4 (strcat Name1 "@"));; name excel value
		(set_tile Name1 Name2)
		(Set_tile Name4 Name3)
		);foreach
	      );progn
	    );If

;;;--- If an action event occurs, do this function
	  (mode_tile "Projectnumber" 2)
	  
          (action_tile
	    "loadcustom"
	    "(CUSTOMPROPERTIES) (customClick)")
	  (action_tile "Deletecustom" "(Deletecustom) (CheckSelect)")
          (action_tile "Createcustom" "(Createcustom) (CheckSelect)")
	  (action_tile "loadexcel" "(GetExcel) (excelclick) (CheckSelect)")
          (action_tile "Getexcel" "(Setcustom) (Changeclick) (CheckSelect)")
	  (action_tile "Putexcel" "(ExtractCAD)")
	  (action_tile "Editexcel" "(PutExOn)")
          (action_tile "cancel" "(done_dialog 0)")
	  (action_tile "SelectAll" "(Toggleselectall)(CheckSelect)" )
	  (action_tile "SelectNone" "(ToggleselectNone)(CheckSelect)" )
	  (action_tile "SelectNone" "(ToggleselectNone)(CheckSelect)" )
	  (action_tile "hide" "(Hide)" )
	  (action_tile "GETDRAWING" "(teken)" )
	  
	  (action_tile "GETEXCELPLANLIJST" "(GETEXCELPLANLIJST)" )
&lt;FONT color="#FF0000"&gt;	  (action_tile "PUTEXCELPLANLIJST" "(Getprojectnumber) (PUTEXCELPLANLIJST) (done_dialog 1)" )&lt;/FONT&gt;

	 
;;;--- Display the dialog box
          (setq ddiag(start_dialog))

	  (if (= ddiag 4)
	    (progn
	      (progn
		(setq string (getstring "\nPress anything if ready"))
		);progn
	      );Progn
	   );IF
	  	  
;;;--- Unload the dialog box
          (unload_dialog dcl_id)

;;;--- If the user pressed the Cancel button
          (if(= ddiag 0)
            (princ "\n DOSSIER cancelled!")
          );IF


&lt;FONT color="#FF0000"&gt;	  (if(= ddiag 1)
            (Sillycommandforscript)
          );IF&lt;/FONT&gt;

	  
	  );PROGN
	);IF
      );PROGN
    );IF
    );while

;;;---Regenerate CAD
  (vla-regen activedocument 1)
  
;;;---Clean 5 times unused objects
  (repeat 5 (gc))
  (princ)
  );DEFUN&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun PUTEXCELPLANLIJST ( / dossval DWGprefix Externfolder script Drawings Drawing Files 
			  sf dossfile TextDoss)


  (setq DWGprefix (getvar "dwgprefix"))
  (setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#"))
  (setq TextDoss (strcat Externfolder "\\BinDossVal.txt"))

  (setq dossfile (open TextDoss  "R"))
  (setq  dossval (read-line dossfile))
  (close dossfile)


  (if (= GetValList1 nil)
    (setq Drawings(GetFiles))
    (setq Drawings (GetValList1))
    )
 
  (setq ThisDwg (strcat DWGprefix (getvar "dwgname")))
  (setq script (strcat Externfolder "\\BinOpenDWGforTitleblock.SCR"))



  (foreach x Drawings
    (setq Drawing (strcat DWGprefix x ".dwg"))

   
    (if (not(= Drawing ThisDwg))
      (setq Files (cons Drawing Files))
      )
    )
 

  (if (&amp;gt; (length Files) 0)
	(progn
	  (setq sf (open script "w"))

	  (write-line "Filedia" sf)
	  (write-line "0" sf)
	  (foreach dwg Files
	    (write-line "_.open" sf)
	    (write-line (strcat "\""dwg "\"") sf)
	    (write-line "(load \"Dossier\")" sf)
	    (write-line "DISTRIBUTEEXCELPLANNLIJST" sf)
	    (write-line "_.qsave" sf)
	    (write-line "_.close" sf)
	    )
	  (write-line "Filedia" sf)
	  (write-line "1" sf)
&lt;FONT color="#FF0000"&gt;	  (close sf)
	  
	  
	  )&lt;/FONT&gt;
	
	)
;;;
;;;        )
;;;    )
  (princ)
  ); Defun&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#FF0000"&gt;(defun c:Sillycommandforscript (/ DWGprefix Externfolder script)

  (setq DWGprefix (getvar "dwgprefix"))
  (setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#"))
  (setq script (strcat Externfolder "\\BinOpenDWGforTitleblock.SCR"))
 
  (&lt;FONT color="#0000FF" size="5"&gt;command-s&lt;/FONT&gt; "script" script )

  )&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 20:57:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510279#M143789</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-17T20:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510287#M143790</link>
      <description>&lt;P&gt;Subje,&lt;/P&gt;
&lt;P&gt;are you in AC2015?&lt;/P&gt;
&lt;P&gt;My AutoCAD (at this old laptop) is very old, and does not recognize the 'command-s' function...&lt;/P&gt;
&lt;P&gt;Glad you got it sorted!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: Subje, at home, &lt;SPAN class="hps"&gt;I'm connected to my office network&lt;/SPAN&gt;&amp;nbsp;via VPN on my laptop and box, but this old laptop is only to test new codes and new software add-ons...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 21:08:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510287#M143790</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-17T21:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510318#M143791</link>
      <description>&lt;P&gt;Henrique&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes i am. Got them both on my personal and workPC, and i once stumbled on that command-s thingie, but didn't had any problem later with that change.&lt;/P&gt;&lt;P&gt;well getting the VPN network at home is also one of my to-do's.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gonna let this open. Could be i will return. i had to admit, getting attributes from blocks was one of the thoughest function i wrote, excel was easier.&lt;/P&gt;&lt;P&gt;Thanks for support!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 21:21:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510318#M143791</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-17T21:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510325#M143792</link>
      <description>&lt;P&gt;You're welcome, Subje!&lt;BR /&gt;Keep on coding!&lt;BR /&gt;&lt;BR /&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 21:25:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510325#M143792</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-17T21:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510877#M143793</link>
      <description>&lt;P&gt;Ok i stumbled on something else,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i do the script i open every file, works fine, but after the script he returns another Dwg (one that was also open before&amp;nbsp;excuting the lisp) .&amp;nbsp;&lt;/P&gt;&lt;P&gt;So to explain it better, i have 2 drawings open. Drawing1 / Drawing2. when i excute the lisp in drawing1 he overruns every drawing in the script and then goes to Drawing 2 instead of drawing1. is there a way, in lisp language to change file in MSI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 09:40:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510877#M143793</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-18T09:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510940#M143794</link>
      <description>&lt;P&gt;Hi Subje,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="gt-card-ttl-txt" style="direction: ltr;"&gt;fully&lt;/SPAN&gt; untested...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&amp;nbsp;What&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;occurs to me is:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in your code add this lines&lt;/P&gt;
&lt;PRE&gt;(setq *currdoc* (vla-get-activedocument (vlax-get-acad-object)))
(vl-propagate '*currdoc*)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;and at the script end, add&lt;/P&gt;
&lt;PRE&gt;(vla-activate *currdoc*)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps, &lt;BR /&gt;Henrique&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 10:47:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510940#M143794</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-18T10:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510965#M143795</link>
      <description>&lt;P&gt;hi Henrique,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tested it. In the lisp he doesn't go futher then the last close (see script below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i put the&amp;nbsp;lines in commandbar, it works so i think it has problaby to do with my script, maybe that last close doesn't active that Dwg?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: I noticed he just doesn't do anything after that last "close" command.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Filedia
0
_.open
"R:\5100-5199\5107 Vaneenoo Noirefontaine Hall 2\ACAD\5107_Noir Fontaine Hall 2_Wapening.dwg"
(load "Dossier")
(DISTRIBUTEEXCELPLANNLIJST)
_.qsave
_.close
_.open
"R:\5100-5199\5107 Vaneenoo Noirefontaine Hall 2\ACAD\5107_Noir Fontaine Hall 2_Kolommen3.dwg"
(load "Dossier")
(DISTRIBUTEEXCELPLANNLIJST)
_.qsave
_.close
_.open
"R:\5100-5199\5107 Vaneenoo Noirefontaine Hall 2\ACAD\5107_Noir Fontaine Hall 2_Fundering.dwg"
(load "Dossier")
(DISTRIBUTEEXCELPLANNLIJST)
_.qsave
_.close
(vla-activate *currdoc*)
(AlertEditedblocks)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 11:21:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5510965#M143795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-18T11:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5511366#M143796</link>
      <description>&lt;P&gt;Hi Subje,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did send you a code &lt;SPAN class="hps"&gt;with&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;another approach!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Did send it via PM, because it's a code that &lt;SPAN class="hps"&gt;can only work&lt;/SPAN&gt; in AC2015, and I dont have AC2015 to test it, so is untested...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Henrique&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 15:48:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5511366#M143796</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-18T15:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error when loading a script with lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5513974#M143797</link>
      <description>&lt;P&gt;we found a solution, for the followers:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i close the dwg and reopen it with scrip so i have directly acces again and i can keep coding. Lisp can't continue if you activate another drawing, you get a report "lisp can't reenter" or such as that su you will eventually need script or other codingprogram.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun PUTEXCELPLANLIJST ( / dossval DWGprefix Externfolder script Drawings Drawing Files 
			  sf dossfile TextDoss ThisDwg Countblock CoFile Activefile AcFile
			  Lokaalfolder)

  (setq DWGprefix (getvar "dwgprefix"))
  (setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#"))
  (setq Countblock (strcat Externfolder "\\BinCountBlock.txt"))
  (setq ThisDwg (strcat DWGprefix (getvar "dwgname")))

  (setq dossval (get_tile "Projectnumber"))
    
  (setq Countblock (strcat Externfolder "\\BinCountBlock.txt"))
  (setq CoFile (open Countblock  "W"))
  (close CoFile)

  (setq Drawings (GetValList1))
  (setq script (strcat Externfolder "\\BinOpenDWGforTitleblock.SCR"))
  (foreach x Drawings
    (setq Drawing (strcat DWGprefix x ".dwg"))
    (if (not(= Drawing ThisDwg))
      (setq Files (cons Drawing Files))
      )
    )
;;; from here the script start writing...
  (if (&amp;gt; (length Files) 0)
	(progn
	  (setq sf (open script "w"))
	  (write-line "Filedia" sf)
	  (write-line "0" sf)
&lt;FONT color="#0000FF"&gt;	  (write-line "_.qsave" sf)
	  (write-line "close" sf)&lt;/FONT&gt;
	  (foreach dwg Files
	    (write-line "_.open" sf)
	    (write-line (strcat "\""dwg "\"") sf)
	    (write-line "(load \"Dossier\")" sf)
	    (write-line "(DISTRIBUTEEXCELPLANNLIJST)" sf)
	    (write-line "_.qsave" sf)
	    (write-line "close" sf)
	    )

&lt;FONT color="#0000FF"&gt;	  (write-line "_.open" sf)
	  (write-line (strcat "\"" ThisDwg "\"") sf)&lt;/FONT&gt;
	  (write-line "Filedia" sf)
	  (write-line "1" sf)
	  (foreach x Drawings
	    (setq Drawing (strcat DWGprefix x ".dwg"))
	    (if (= Drawing ThisDwg)
	    (write-line "(DISTRIBUTEEXCELPLANNLIJST)" sf)
	      )
	    )
	  (write-line "(AlertEditedblocks)" sf)
	  (write-line "_.qsave" sf)
	  (write-line "_.regen" sf)
	  (close sf)
	  )
	)
  (princ)
  )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2015 08:55:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-when-loading-a-script-with-lisp/m-p/5513974#M143797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-20T08:55:07Z</dc:date>
    </item>
  </channel>
</rss>

