<?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: running a script through a batch file in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10968109#M48945</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are right it is a * in the * to debug this one, but I haven't given up on it yet. Since I know it should work. It might take some time but if I do find how to make it work I will let you all know.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Feb 2022 19:01:25 GMT</pubDate>
    <dc:creator>Michiel.Valcke</dc:creator>
    <dc:date>2022-02-23T19:01:25Z</dc:date>
    <item>
      <title>running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10956125#M48938</link>
      <description>&lt;P&gt;I'm trying to set up a workflow where I can run several cleanup scripts on a collection of files.&lt;BR /&gt;&lt;BR /&gt;I started with a simple purge script (which works when loaded manually) and the following batch file from &lt;A href="https://www.autodesk.com/autodesk-university/class/AutoCAD-Scripting-Extreme-VBA-Excel-and-AutoCAD-Core-Console-2019" target="_blank" rel="noopener"&gt;Michael Best's AU class&lt;/A&gt;:&lt;BR /&gt;&lt;BR /&gt;FOR %%f IN ("%~dp0*.dwg") DO "C:\Program Files\Autodesk\AutoCAD 2022\accoreconsole.exe" /i"%%f" /s "%~dp0PurgeAll.scr" /l en-US&lt;BR /&gt;&lt;BR /&gt;-PURGE&lt;BR /&gt;a&lt;BR /&gt;*&lt;BR /&gt;N&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;However, when running the batch file everything seems to work (I get the loading MSDOS window and there are no errors and I see the expected output. But when opening the .dwg's afterwards in acad.exe the actual purging operation does not seem to have been saved to the .dwg's. They still contain unused blocks and layers (while when following the MSDOS progress I could see the notification that they were purged)&lt;BR /&gt;&lt;BR /&gt;So I tried to alter the PurgeAll.scr by adding a QSAVE at the end, but somehow that wants to save the drawing as drawing1.dwg, which halts the batch file as soon as the second drawing is processed. Playing with SAVEAS -SAVE or others have also all halted the batch process.&lt;BR /&gt;&lt;BR /&gt;Has anybody else encountered this problem and how have you solved it?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 10:11:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10956125#M48938</guid>
      <dc:creator>Michiel.Valcke</dc:creator>
      <dc:date>2022-02-17T10:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10956638#M48939</link>
      <description>&lt;P&gt;Maybe this will help you - &lt;STRONG&gt;&lt;A href="https://www.kdmsoft.net/autorunlisp.html" target="_blank" rel="noopener"&gt;AutoRunLisp&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 14:29:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10956638#M48939</guid>
      <dc:creator>maratovich</dc:creator>
      <dc:date>2022-02-17T14:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10958042#M48940</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;For me this type of procedure to purge drawings from an entire folder has always worked well.&lt;BR /&gt;This purges specific application dictionaries, here for example objects from the COVADIS application (French application) or/and from the Autocad Archictectural application.&lt;BR /&gt;This can simply be commented out with a ; at the beginning of the line of the code or adapted according to your needs&lt;BR /&gt;He checks the drawing&lt;BR /&gt;Purges unused applications for the first time&lt;BR /&gt;Purge a 2nd time for all objects&lt;BR /&gt;And saves in LT2018 format&lt;/P&gt;&lt;P&gt;All these commands being customizable, the only trick is to remember to double the " with \" between (write-line " ...... "file_scr) compared to a natural lisp writing.&lt;/P&gt;&lt;P&gt;The code can be copied and pasted directly on the command line, preferably from a blank drawing&lt;/P&gt;&lt;P&gt;After choosing a folder, it will automatically create the script (update.scr) and the batch (update.bat) and AcCoreconsole will start its processing.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;((lambda ( / f_exe ShlObj Folder FldObj Out_Fld file_scr file_bat)
	(vl-load-com)
	(setq f_exe (findfile "accoreconsole.exe"))
	(setq
		ShlObj (vla-getinterfaceobject (vlax-get-acad-object) "Shell.Application")
		Folder (vlax-invoke-method ShlObj 'BrowseForFolder 0 "" 0)
	)
	(vlax-release-object ShlObj)
	(if Folder
		(progn
			(setq
				FldObj (vlax-get-property Folder 'Self)
				Out_Fld (vlax-get-property FldObj 'Path)
			)
			(vlax-release-object Folder)
			(vlax-release-object FldObj)
		)
	)
	(setq file_scr (open (strcat (getvar "ROAMABLEROOTPREFIX") "support\\update.scr") "w"))
	(write-line "((lambda ( / ) (foreach p (entget (namedobjdict)) (if (and (= 3 (car p)) (or (wcmatch (cdr p) \"COVA_*\") (wcmatch (cdr p) \"AEC_*\"))) (dictremove (namedobjdict) (cdr p))))))" file_scr)
	(write-line "(command \"_.audit\" \"_Yes\")" file_scr)
	(write-line "(command \"_.-purge\" \"_Regapps\" \"*\" \"_No\")" file_scr)
	(write-line "(command \"_.-purge\" \"_All\" \"*\" \"_No\")" file_scr)
	(write-line "(command \"_.saveas\" \"_LT2018\" \"\" \"_Yes\")" file_scr)
	(close file_scr)
	(setq file_bat (open (strcat (getvar "ROAMABLEROOTPREFIX") "support\\update.bat") "w"))
	(write-line (eval (read "(strcat \"set accoreexe=\" \"\\\"\" f_exe \"\\\"\")")) file_bat)
	(write-line (eval (read "(strcat \"set source=\" \"\\\"\" Out_Fld \"\\\"\")")) file_bat)
	(write-line (eval (read "(strcat \"set script=\" \"\\\"\" (getvar \"ROAMABLEROOTPREFIX\") \"support\\\\update.scr\" \"\\\"\")")) file_bat)
	(write-line "FOR /f \"delims=\" %%f IN ('dir /b \"%source%\\\*.dwg\"') DO %accoreexe% /i \"%source%\\%%f\" /s %script%" file_bat)
	(close file_bat)
	(startapp (strcat (getvar "ROAMABLEROOTPREFIX") "support\\update.bat"))
	(princ"\Job finished")
	(prin1)
))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Feb 2022 02:22:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10958042#M48940</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2022-02-18T02:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10958661#M48941</link>
      <description>&lt;P&gt;I like your suggestions, I will definitely look into the lisp file to create and run a batch file.&lt;BR /&gt;&lt;BR /&gt;But in essence this is the same as what I'm doing,&lt;BR /&gt;and in my earlier attempts to run it, the coreconsole saves drawings as drawing1.dwg, which halts the routine.&lt;BR /&gt;&lt;BR /&gt;I'll try the lisp approach and see how that changes the behaviour.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 11:02:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10958661#M48941</guid>
      <dc:creator>Michiel.Valcke</dc:creator>
      <dc:date>2022-02-18T11:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10962413#M48942</link>
      <description>&lt;P&gt;Unfortunately the above code somehow doesn't start the batch file to run with me, and if I manually activate it, it also refused to run.&lt;BR /&gt;&lt;BR /&gt;I recovered the update.scr and ran it with my batch file and again the saveas command keeps saving all the drawings as drawing1.dwg. It doesn't halt because of how it is written, but at the end none of the .dwg's in my folder are updated and I end up with a single drawing1 in the same folder that is a cleaned up / purged version of the last .dwg that the batch file ran on.&lt;BR /&gt;&lt;BR /&gt;In the below code you can see the MS DOS readout,&amp;nbsp;&lt;BR /&gt;- the batch file opens a .dwg&lt;BR /&gt;- executes the audit and purge succesfully&lt;BR /&gt;- &lt;STRONG&gt;saves the dwg as drawing1.dwg (overwriting the previous drawing1.dwg)&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;This is the content of the script file (different than the one from the first post)&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(command "_.audit" "_Yes")
(command "_.-purge" "_Regapps" "*" "_No")
(command "_.-purge" "_All" "*" "_No")
(command "_.saveas" "_LT2018" "" "_Yes")&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Command:
C:\Users\michiel.geo-it\Documents\Werkbestanden\test - Copy (2) - Copy&amp;gt;"C:\Program Files\Autodesk\AutoCAD 2022\accoreconsole.exe" /i"C:\Users\michiel.geo-it\Documents\Werkbestanden\test - Copy (2) - Copy\40.dwg" /s "C:\Users\michiel.geo-it\Documents\Werkbestanden\test - Copy (2) - Copy\update.scr" /l en-US
Redirect stdout (file: C:\Users\MICHIE~1.GEO\AppData\Local\Temp\accc108682).
AcCoreConsole: StdOutConsoleMode: processed-output: enabled,auto
AutoCAD Core Engine Console - Copyright 2021 Autodesk, Inc.  All rights reserved. (S.154.0.0)

Execution Path:
C:\Program Files\Autodesk\AutoCAD 2022\accoreconsole.exe
Current Directory: C:\Users\michiel.geo-it\Documents\Werkbestanden\test - Copy (2) - Copy

Version Number: S.154.0.0 (UNICODE)
LogFilePath has been set to the working folder.
Regenerating model.
.
**** System Variable Changed ****
1 of the monitored system variables has changed from the preferred value. Use SYSVARMONITOR command to view changes1 of the monitored system variables has changed from the preferred value. Use SYSVARMONITOR command to view changes.


AutoCAD menu utilities loaded.
Command:
Command:

Command:
Command: (command "_.audit" "_Yes")
_.audit
Fix any errors detected? [Yes/No] &amp;lt;N&amp;gt;: _Yes


Auditing Header


Auditing Tables


Auditing Entities Pass 1

Pass 1 100     objects audited
Auditing Entities Pass 2

Pass 2 100     objects audited
Auditing Blocks

 1       Blocks audited



Auditing AcDsRecords


Total errors found 0 fixed 0

Erased 0 objects


Command: nil

Command: (command "_.-purge" "_Regapps" "*" "_No")
_.-purge
Nested items = Off    Orphaned data = Off
Enter type of unused objects to purge [Blocks/DEtailviewstyles/Dimstyles/Groups/LAyers/LTypes/MAterials/MUltileaderstyles/Plotstyles/SHapes/textSTyles/Mlinestyles/SEctionviewstyles/Tablestyles/Visualstyles/Regapps/Zero-length geometry/Empty text objects/Orphaned data/All]: _Regapps Enter name(s) to purge &amp;lt;*&amp;gt;: * Verify each name to be purged? [Enter type of unused objects to purge [Blocks/DEtailviewstyles/Dimstyles/Groups/LAyers/LTypes/MAterials/MUltileaderstyles/Plotstyles/SHapes/textSTyles/Mlinestyles/SEctionviewstyles/Tablestyles/Visualstyles/Regapps/Zero-length geometry/Empty text objects/Orphaned data/All]: _Regapps Enter name(s) to purge &amp;lt;*&amp;gt;: * Verify each name to be purged? [Yes/No] &amp;lt;Y&amp;gt;: _No Deleting registered application "ACAD_MLEADERVER".
Deleting registered application "AcadAnnoPO".
2 registered applications deleted.

Command: nil

Command: (command "_.-purge" "_All" "*" "_No")
_.-purge
Nested items = Off    Orphaned data = Off
Enter type of unused objects to purge [Blocks/DEtailviewstyles/Dimstyles/Groups/LAyers/LTypes/MAterials/MUltileaderstyles/Plotstyles/SHapes/textSTyles/Mlinestyles/SEctionviewstyles/Tablestyles/Visualstyles/Regapps/Zero-length geometry/Empty text objects/Orphaned data/All]: _All Enter name(s) to purge &amp;lt;*&amp;gt;: * Verify each name to be purged? [Yes/Enter type of unused objects to purge [Blocks/DEtailviewstyles/Dimstyles/Groups/LAyers/LTypes/MAterials/MUltileaderstyles/Plotstyles/SHapes/textSTyles/Mlinestyles/SEctionviewstyles/Tablestyles/Visualstyles/Regapps/Zero-length geometry/Empty text objects/Orphaned data/All]: _All Enter name(s) to purge &amp;lt;*&amp;gt;: * Verify each name to be purged? [Yes/No] &amp;lt;Y&amp;gt;: _No
No unreferenced blocks found.

No unreferenced layers found.

No unreferenced linetypes found.
Deleting text style "Annotative".
1 text style deleted.

No unreferenced shape files found.
Deleting dimension style "Annotative".
Deleting dimension style "Standard".
2 dimension styles deleted.

No unreferenced mlinestyles found.

No unreferenced plotstyles found.

No unreferenced table styles found.

No unreferenced materials found.

No unreferenced visual styles found.
Deleting multileader style "Annotative".
1 multileader style deleted.

No unreferenced groups found.

No unreferenced Detail view styles found.

No unreferenced Section view styles found.

Command: nil

Command: (command "_.saveas" "_LT2018" "" "_Yes")
_.saveas
Current file format: AutoCAD 2018 Drawing
Enter file format [R14(LT98&amp;amp;LT97)/2000(LT2000)/2004(LT2004)/2007(LT2007)/2010(LT2010)/2013(LT2013)/2018(LT2018)/Standards/DXF/Template] &amp;lt;2018&amp;gt;: _LT2018 Save drawing as &amp;lt;C:\Users\michiel.geo-it\Documents\Werkbestanden\test - Copy (Enter file format [R14(LT98&amp;amp;LT97)/2000(LT2000)/2004(LT2004)/2007(LT2007)/2010(LT2010)/2013(LT2013)/2018(LT2018)/Standards/DXF/Template] &amp;lt;2018&amp;gt;: _LT2018 Save drawing as &amp;lt;C:\Users\michiel.geo-it\Documents\Werkbestanden\test - Copy (2) - Copy\Drawing1.dwg&amp;gt;: A drawing with this name already exists.
Do you want to replace it? &amp;lt;N&amp;gt; _Yes
Command: nil&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 09:14:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10962413#M48942</guid>
      <dc:creator>Michiel.Valcke</dc:creator>
      <dc:date>2022-02-21T09:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10962420#M48943</link>
      <description>&lt;P&gt;I'm beginning to suspect the error is produced by how the accoreconsole implements the save command, and that this might be unavoidable, but then I don't see how anybody else can get their accoreconsole batch processes to save the files in question.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 09:17:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10962420#M48943</guid>
      <dc:creator>Michiel.Valcke</dc:creator>
      <dc:date>2022-02-21T09:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10963964#M48944</link>
      <description>&lt;P&gt;One thing that intrigues me in your return messages is the line:&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;AutoCAD menu utilities loaded.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;For my part I don't have this kind of feedback in my AcCoreConsole version: Version Number: P.46.0.0 (UNICODE)&lt;BR /&gt;I don't understand why AutoCAD loads menus while AcCoreConsole doesn't use GUI.&lt;/P&gt;&lt;P&gt;The big disadvantage of the console is that in case of error, there is no error message and the script is not interrupted.&lt;BR /&gt;Another thing I noticed is that AcCoreConsole does not recognize lisp vla and vlax instructions as well as vertical product commands: for me for example an AutocadMap command like MAPINSERT (or others) is not recognized and this no return message, not easy to debug &lt;span class="lia-unicode-emoji" title=":downcast_face_with_sweat:"&gt;😓&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 02:37:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10963964#M48944</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2022-02-22T02:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10968109#M48945</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are right it is a * in the * to debug this one, but I haven't given up on it yet. Since I know it should work. It might take some time but if I do find how to make it work I will let you all know.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 19:01:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/10968109#M48945</guid>
      <dc:creator>Michiel.Valcke</dc:creator>
      <dc:date>2022-02-23T19:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/11113810#M48946</link>
      <description>&lt;P&gt;I didn't find a real solution, but the issue apparently was generated by the way the batch file was formulated.&lt;BR /&gt;&lt;BR /&gt;As long as the batch file was self-referencing to its own location for selecting the .dwg's that need to be treated, the accoreconsole generated the above error.&lt;BR /&gt;&lt;BR /&gt;So instead of&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;FOR %%f IN ("%~dp0*.dwg") DO "C:\Program Files\Autodesk\AutoCAD 2022\accoreconsole.exe" /i"%%f" /s "%~dp0PurgeAll.scr" /l en-US&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following (based on &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp; 's lisp routine):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set accoreexe="C:\Program Files\Autodesk\AutoCAD 2022\accoreconsole.exe"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set source="C:\Users\xxx\test"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set script="C:\Users\xxx\test\update.scr"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;FOR /f "delims=" %%f IN ('dir /b "%source%\*.dwg"') DO %accoreexe% /i %source%\%%f /s %script%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still have no explanation for this, but this has solved it for me.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 11:37:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/11113810#M48946</guid>
      <dc:creator>Michiel.Valcke</dc:creator>
      <dc:date>2022-04-19T11:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/11672382#M48947</link>
      <description>&lt;P&gt;Late to the game, but if PURGE is all you want from a set of files, you can use the "DWG Convert" tool found off the App Menu:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oiverson_0-1673460836484.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1161406iEF4BF0FC973C4D1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="oiverson_0-1673460836484.png" alt="oiverson_0-1673460836484.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Click the "Conversion Setups" button:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oiverson_1-1673460873846.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1161407i44F496EBCD30FAE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="oiverson_1-1673460873846.png" alt="oiverson_1-1673460873846.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Click "New":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oiverson_2-1673460899614.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1161408iD0958F8B36D7A4BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="oiverson_2-1673460899614.png" alt="oiverson_2-1673460899614.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Give it a name like "PURGE":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oiverson_3-1673460927121.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1161411iCCC90EE6D879D805/image-size/medium?v=v2&amp;amp;px=400" role="button" title="oiverson_3-1673460927121.png" alt="oiverson_3-1673460927121.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I use "In-place (overwrite)" and then just tick the box "Purge Drawings" over on the right (could also check/fix errors):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oiverson_4-1673460996741.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1161412i98F8CDB4406DDAC6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="oiverson_4-1673460996741.png" alt="oiverson_4-1673460996741.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, you can just drag your files into the main window, select the new conversion PURGE and hit "Convert"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="oiverson_5-1673461072260.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1161413i036C8ACB7D803DAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="oiverson_5-1673461072260.png" alt="oiverson_5-1673461072260.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can also save the list for future reference and all that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also use this to swap out old Page-Setups with my current setups (sadly, you can't set a setup current using this tool)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps someone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 18:19:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/11672382#M48947</guid>
      <dc:creator>oiverson</dc:creator>
      <dc:date>2023-01-11T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/11672429#M48948</link>
      <description>&lt;P&gt;I intend to try and do a lot more things than purge, but that is a cool trick that I didn't know about, kudos.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 18:35:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/11672429#M48948</guid>
      <dc:creator>Michiel.Valcke</dc:creator>
      <dc:date>2023-01-11T18:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: running a script through a batch file</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/11672850#M48949</link>
      <description>&lt;P&gt;Glad you may have gotten your problem solved but from looking at the short BATCH SCRIPT example you gave (you got from Michael possibly) your features/functionality is a bit limited -e.g. this will run the script on every drawing in the directory meaning that you'd have to copy that .bat file to every directory, or modify it for different scripts, or, etc, etc. (a whole slew of reasons).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a better script/workflow that supports either drag-and-drop or can be called with a list of files or even called via a simple registry entry (aka right click).&amp;nbsp; I needed a similar thing a few years back but I needed to run the script on a few hundred drawings out of a thousand, so I created my batch methodology a bit different. Also, I added instructions on how to run my .bat file with&amp;nbsp;&lt;SPAN&gt;Briscad if that's a need as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do a search for "batch drawing processing" on theswamp.org's show your stuff forum for a "ready to use" version.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 21:35:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/running-a-script-through-a-batch-file/m-p/11672850#M48949</guid>
      <dc:creator>john.kaulB9QW2</dc:creator>
      <dc:date>2023-01-11T21:35:59Z</dc:date>
    </item>
  </channel>
</rss>

