<?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: Batch Processing on all open drawings with LISP in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/11447646#M83986</link>
    <description>&lt;P&gt;In order for that to work in the lisp I provided, the delete point code will need to be added to the lisp somewhere and then call the command from the script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tested and this works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:BatchJob (/ dwgs file dwgName scrFile folderName)
  (setq folderName
  (browsefolder "Select folder to perform batch job: ")
  )
  (setq dwgs (vl-directory-files folderName "*.dwg"))
  (setq scrFile (open (strcat folderName "\\batchJob.scr") "w"))
  (foreach file dwgs
	(setq dwgName (strcat "\"" folderName "\\" file "\""))
	(write-line ".Open" scrFile) 
	(write-line dwgName scrFile)
	(write-line "DPNT" scrFile)
	(write-line ".Qsave" scrFile)
	(write-line ".close" scrFile)
	

  )	 
  (close scrFile)  
  (command ".script" (strcat folderName "\\batchJob.scr"))
  (princ)
)	
;;; Function to browse folder
;;; This code was originally posted by kpblc2000 in AUGI AutoLisp Forum
;;;
(defun browsefolder (title / shlobj folder fldobj)
  (vl-load-com)
  (setq
	shlobj (vla-getinterfaceobject
	  (vlax-get-acad-object)
	  "Shell.Application"
	)
	folder (vlax-invoke-method shlobj 'browseforfolder 0 title 0)
  )
  (vlax-release-object shlobj)
  (if folder
	(progn
	  (setq
 fldobj	(vlax-get-property folder 'self)
 folderName (vlax-get-property fldobj 'path)
	  )
	  (vlax-release-object folder)
	  (vlax-release-object fldobj)
	  folderName
	)
  )
  (princ)
)

;; Delete Point
(defun C:DPNT (/ SS1)
  (setq SS1 (ssget "x" '((0 . "point"))))
  (if SS1
    (progn
      (command "erase" SS1 "")
      (princ "\nAll Points Erased!")
      )
    (princ "\nNo Points Found!")
    )
  (princ)
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2022 11:44:00 GMT</pubDate>
    <dc:creator>Jonathan3891</dc:creator>
    <dc:date>2022-09-27T11:44:00Z</dc:date>
    <item>
      <title>Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9036247#M83977</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a LISP routine that I am trying to implement batch processing on. It takes a job and applies company standards to a drawing, then prints it with a specific naming format, and saves it in the related place. The naming changes according to drawing-specific attributes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have it set-up in an OOP format. The command must be executed on each drawing, and there could be 100+. Using a foreach loop would surely be my best approach at this point in time, but &lt;STRONG&gt;how can I iterate my process through every drawing the user has open? (In other words, foreach drawing open, perform the main routine)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've considered converting my code to publish instead of plot for efficiency and did a pro/cons list. I don't think its the best decision right now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Also, how could I retrieve all of the open drawing names with another foreach loop, and have them listed in a dialog box with a Confirm / Cancel option before processing my script?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 22:44:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9036247#M83977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-19T22:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9036484#M83978</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the best way to run lisp through list of dwg is ScriptPro 2.0&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.cadstudio.cz/en/download.asp?file=ScriptPro+2.0.3+-+batch+script+processor+for+..." target="_blank" rel="noopener"&gt;&amp;gt;&amp;gt; download ScriptPro 2.0 from here &amp;lt;&amp;lt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if you can not get ScriptPro then create a script (scr) file. you can write a small lisp to create a script for specific folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to retrieve the opened documents (files) you need to use ActiveX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; get the pointer to opened documents&lt;/P&gt;&lt;P&gt;(setq docs (vla-get-documents (vlax-get-acad-object)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enjoy&lt;/P&gt;&lt;P&gt;moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 03:47:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9036484#M83978</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2019-09-20T03:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9036488#M83979</link>
      <description>&lt;P&gt;This little snippit may help you can get via vl what dwgs are currently open.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;(defun openblk (blkname / adocs)&lt;BR /&gt;(setq acDocs (vla-get-documents (vlax-get-acad-object)))&lt;BR /&gt;(vla-open acDocs blkname)&lt;BR /&gt;(vla-activate (vla-item acdocs 1))&lt;BR /&gt;;(vla-put-activedocument (vlax-get-acad-object) (vla-item acdocs 1))&lt;BR /&gt;)&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;[/code]&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 03:51:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9036488#M83979</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-09-20T03:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9036501#M83980</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;For batch printing use this (no problem):&lt;/SPAN&gt;&amp;nbsp; &lt;A href="https://www.kdmsoft.net/revers.html" target="_blank" rel="noopener"&gt;Revers&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For batch Lisp use this: &lt;A href="https://www.kdmsoft.net/autoviewport.html" target="_blank" rel="noopener"&gt;AutoViewport&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 04:13:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9036501#M83980</guid>
      <dc:creator>maratovich</dc:creator>
      <dc:date>2019-09-20T04:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9037198#M83981</link>
      <description>&lt;P&gt;You could give this a try. It doesn't work on all open drawings, but all drawings in a folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:BatchJob (/ dwgs file dwgName scrFile folderName)
  (setq folderName
  (browsefolder "Select folder to perform batch job: ")
  )
  (setq dwgs (vl-directory-files folderName "*.dwg"))
  (setq scrFile (open (strcat folderName "\\batchJob.scr") "w"))
  (foreach file dwgs
	(setq dwgName (strcat "\"" folderName "\\" file "\""))
	(write-line ".Open" scrFile) 
	(write-line dwgName scrFile)
	(write-line "SomeCommand" scrFile)
	(write-line ".Qsave" scrFile)
	(write-line ".close" scrFile)

  )	 
  (close scrFile)  
  (command ".script" (strcat folderName "\\batchJob.scr"))
  (princ)
)	
;;; Function to browse folder
;;; This code was originally posted by kpblc2000 in AUGI AutoLisp Forum
;;;
(defun browsefolder (title / shlobj folder fldobj)
  (vl-load-com)
  (setq
	shlobj (vla-getinterfaceobject
	  (vlax-get-acad-object)
	  "Shell.Application"
	)
	folder (vlax-invoke-method shlobj 'browseforfolder 0 title 0)
  )
  (vlax-release-object shlobj)
  (if folder
	(progn
	  (setq
 fldobj	(vlax-get-property folder 'self)
 folderName (vlax-get-property fldobj 'path)
	  )
	  (vlax-release-object folder)
	  (vlax-release-object fldobj)
	  folderName
	)
  )
)
(princ)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 12:51:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9037198#M83981</guid>
      <dc:creator>Jonathan3891</dc:creator>
      <dc:date>2019-09-20T12:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9048052#M83982</link>
      <description>&lt;P&gt;My LISP script applies certain styles to a set of open drawings, and plots them with company standard naming, while saving a copy in two locations relative to some attributes in the block of a drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently our process is to open each drawing, and type the command which executes these functions. The issue is we must perform the command on each drawing individually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, if there are 100 drawings, we must type the command 100 times. My hopes is to have all 100 drawings open, and have the lisp function be able to iterate through every open drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my current main function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun batchissue_main ()
(textpage)
(princ "\n ")
(princ)
(princ "\n ")
(princ)
    (progn (setting)
	    (border)
	    (gather)
	    (type_issue)
	    (pset)
	    (checkexistissue)
	    (deleteoldpdf)
      	    (pdfissue)
    )
  (princ)
)					;defun
(princ)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm hoping to turn it into something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun C:batchissue_main ()
(textpage)
(princ "\n ")
(princ)
(princ "\n ")
(princ)&lt;BR /&gt;~FOR EACH DRAWING OPEN~
    (progn (setting)
	    (border)
	    (gather)
	    (type_issue)
	    (pset)
	    (checkexistissue)
	    (deleteoldpdf)
      	    (pdfissue)
    )
  (princ)&lt;BR /&gt;~~END FOR EACH DRAWING OPEN
)					;defun
(princ)&lt;/PRE&gt;&lt;P&gt;Any ideas related to approaching this situation?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 17:51:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9048052#M83982</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-25T17:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9048277#M83983</link>
      <description>&lt;P&gt;&lt;SPAN&gt;If so Try this in SDI Mode....... (only one drawing will be in opened condition in that AutoCAD session)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Run the LISP and&amp;nbsp;Select the Folder of Drawings you want to Process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This program is a sample which will place a text&amp;nbsp;"SAMPLE TEXT" at "0,0,0" in Model space of each drawing of the target folder...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun C:Batch_Run ( / *error* sh folder SDI_Val LISPI_Val folderobject result Files_Folder n)
	(vl-load-com)
	(defun *error* ( msg )
		(setvar 'SDI SDI_Val)(setvar 'LISPINIT LISPI_Val)
		(if (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*"))
			(princ (strcat "\nOops an Error : " msg " occurred."))
		)
		(princ)
	)  
	(setq SDI_Val (getvar 'SDI))
	(setq LISPI_Val (getvar 'LISPINIT))
	(setq sh (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application" ))
	(setq folder (vlax-invoke-method sh 'BrowseForFolder 0 "Select Folder of Drawings to Process" 512 ))
	(vlax-release-object sh)
	(setvar 'cmdecho 0)(setvar 'SDI 1)(setvar 'LISPINIT 0)
	(if folder
		(progn
			(setq folderobject (vlax-get-property folder 'Self))
			(setq result (vlax-get-property FolderObject 'Path))
			(vlax-release-object folder)
			(vlax-release-object FolderObject)
			(setq Files_Folder (vl-directory-files result "*.dwg"))
			(command "save" (strcat (getvar "dwgprefix") (getvar "dwgname")) "Y")
			(setq n 0)
			(while (&amp;lt; n (length Files_Folder))
				(command "fileopen" (strcat result "\\" (nth n Files_Folder)));;;Open Each Drawing
				&lt;FONT color="#FF0000"&gt;;;;;;;; commands to run on each drawig starts here ;;;;;;;&lt;/FONT&gt;
				
				&lt;FONT color="#0000FF"&gt;(setvar 'TILEMODE 1);For texting - Changing to Model Space ;;; Remove this line
				(command "_.text" "0,0,0" "10" "" "SAMPLE TEXT");For texting - Placing Text at 0,0,0 ;;; Remove this line&lt;/FONT&gt;
				
				&lt;FONT color="#FF0000"&gt;;;;;;;; commands to run on each drawig ends here ;;;;;;;&lt;/FONT&gt;
				(vl-cmdf "save" (strcat result "\\" (nth n Files_Folder)));;;Save &amp;amp; Close opened Drawing
				(setq n (+ 1 n))
			)
		)
	)
	(setvar 'SDI SDI_Val)(setvar 'LISPINIT LISPI_Val)(setvar 'cmdecho 1)
	(princ)
)&lt;/PRE&gt;&lt;P&gt;You remove the Blue lines and place your commands there, those will run in each Drawing&amp;nbsp;of the target folder... (still every thing depends on your functions behavior).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more talk in morning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 19:57:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9048277#M83983</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2019-09-25T19:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9048809#M83984</link>
      <description>&lt;P&gt;You want to process a 100 dwgs I would look at using scripts they can run lisp on a open dwg. So as posted else where you could do stuff like what layouts to plot in a dwg using say excel to pick the layouts printer etc. A tick boxes approach you will be surprised how fast a dwg can open plot and then close with no user interaction.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 02:36:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/9048809#M83984</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-09-26T02:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/11446239#M83985</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/756506"&gt;@Jonathan3891&lt;/a&gt;&amp;nbsp;and guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lisp is not my best language &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; , So:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;using this code:&lt;/P&gt;
&lt;P&gt;I just try change the line&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(write-line "SomeCommand" scrFile)&lt;/PRE&gt;
&lt;P&gt;For some like this:&lt;/P&gt;
&lt;P&gt;"(sssetfirst nil (ssget "_x" '((0 . "point"))))"&lt;/P&gt;
&lt;P&gt;(write-line "Erase" scrFile)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My idea is open all files, select all points and delete all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you help me ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 17:24:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/11446239#M83985</guid>
      <dc:creator>Crstiano</dc:creator>
      <dc:date>2022-09-26T17:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/11447646#M83986</link>
      <description>&lt;P&gt;In order for that to work in the lisp I provided, the delete point code will need to be added to the lisp somewhere and then call the command from the script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tested and this works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:BatchJob (/ dwgs file dwgName scrFile folderName)
  (setq folderName
  (browsefolder "Select folder to perform batch job: ")
  )
  (setq dwgs (vl-directory-files folderName "*.dwg"))
  (setq scrFile (open (strcat folderName "\\batchJob.scr") "w"))
  (foreach file dwgs
	(setq dwgName (strcat "\"" folderName "\\" file "\""))
	(write-line ".Open" scrFile) 
	(write-line dwgName scrFile)
	(write-line "DPNT" scrFile)
	(write-line ".Qsave" scrFile)
	(write-line ".close" scrFile)
	

  )	 
  (close scrFile)  
  (command ".script" (strcat folderName "\\batchJob.scr"))
  (princ)
)	
;;; Function to browse folder
;;; This code was originally posted by kpblc2000 in AUGI AutoLisp Forum
;;;
(defun browsefolder (title / shlobj folder fldobj)
  (vl-load-com)
  (setq
	shlobj (vla-getinterfaceobject
	  (vlax-get-acad-object)
	  "Shell.Application"
	)
	folder (vlax-invoke-method shlobj 'browseforfolder 0 title 0)
  )
  (vlax-release-object shlobj)
  (if folder
	(progn
	  (setq
 fldobj	(vlax-get-property folder 'self)
 folderName (vlax-get-property fldobj 'path)
	  )
	  (vlax-release-object folder)
	  (vlax-release-object fldobj)
	  folderName
	)
  )
  (princ)
)

;; Delete Point
(defun C:DPNT (/ SS1)
  (setq SS1 (ssget "x" '((0 . "point"))))
  (if SS1
    (progn
      (command "erase" SS1 "")
      (princ "\nAll Points Erased!")
      )
    (princ "\nNo Points Found!")
    )
  (princ)
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 11:44:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/11447646#M83986</guid>
      <dc:creator>Jonathan3891</dc:creator>
      <dc:date>2022-09-27T11:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/11448024#M83987</link>
      <description>&lt;P&gt;Your code is similar I tried yestarday. But found the same problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Explain:&lt;/P&gt;
&lt;P&gt;After LoadApplication. It´s load successful. Commands Batchjob and NPNT loaded.&lt;/P&gt;
&lt;P&gt;Executing Bachtjob:&lt;/P&gt;
&lt;P&gt;It asked folder, create the script, but when try execute the&amp;nbsp; NPNT .. it don't recognition the command..&lt;/P&gt;
&lt;P&gt;There's something wrong ??&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 14:44:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/11448024#M83987</guid>
      <dc:creator>Crstiano</dc:creator>
      <dc:date>2022-09-27T14:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Processing on all open drawings with LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/11448904#M83988</link>
      <description>&lt;P&gt;Its a 2 step process make the lisp that does all the work and save it, 2nd step is using a lisp make the script file, you would then just load the pre-saved lisp, it can have a defun so call that as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Open dwg1
(load "mylisp")
(mydefun)
Close
Y
open dwg2
................&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Sep 2022 00:39:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/batch-processing-on-all-open-drawings-with-lisp/m-p/11448904#M83988</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-09-28T00:39:22Z</dc:date>
    </item>
  </channel>
</rss>

