<?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: Request for a Lisp to batch change all drawing text styles to any style in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8419548#M96315</link>
    <description>&lt;P&gt;I would try to use ObjectDBX but I'm totally busy right now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the reference of how I would do it:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.lee-mac.com/odbxbase.html" target="_blank"&gt;http://www.lee-mac.com/odbxbase.html&lt;/A&gt;&lt;/P&gt;
&lt;H3&gt;Example 4&lt;/H3&gt;</description>
    <pubDate>Thu, 22 Nov 2018 22:03:20 GMT</pubDate>
    <dc:creator>Luís Augusto</dc:creator>
    <dc:date>2018-11-22T22:03:20Z</dc:date>
    <item>
      <title>Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8416793#M96305</link>
      <description>&lt;P&gt;I need to change multiple text styles from files with multiple blocks I will take a lot of time _exploding and changing all styles to ROMANS (what I need for this case).&lt;BR /&gt;&lt;BR /&gt;Can anyone share me a LISP to change all styles from multiple drawings at the same time?&lt;BR /&gt;&lt;BR /&gt;PD: I already tested a lot of LISPs from google but no one of those work, for a file or a folder.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 16:48:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8416793#M96305</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-21T16:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8416892#M96306</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;I need to change multiple text styles from files with multiple blocks I will take a lot of time _exploding and changing all styles to ROMANS&lt;/FONT&gt; (what I need for this case).&lt;BR /&gt;&lt;BR /&gt;Can anyone share me a LISP to change all styles from multiple drawings at the same time?&lt;BR /&gt;&lt;BR /&gt;PD: I already tested a lot of LISPs from google but no one of those work, for a file or a folder.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the above highlighted point explain with attachment ........ with a file before changing all text styles And after&lt;SPAN&gt;&amp;nbsp;changing all text styles&amp;nbsp;in that file (two file separately)..... in AutoCAD 2007 format.....&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 17:19:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8416892#M96306</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-11-21T17:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8416894#M96307</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;Try this routine and let us know if it worked.&lt;/P&gt;
&lt;P&gt;Best regards, Luís Augusto&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=17659.0" target="_blank"&gt;http://www.theswamp.org/index.php?topic=17659.0&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 17:25:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8416894#M96307</guid>
      <dc:creator>Luís Augusto</dc:creator>
      <dc:date>2018-11-21T17:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8417411#M96308</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;drawing tested in attached.&lt;BR /&gt;&lt;BR /&gt;Sr, how can I load .dcl and .lsp file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I already tried to put both files in the same folder and load .lsp file.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 730px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/572322iB4A281A92125A795/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cant make work that lisp code. maybe I'm doing something&amp;nbsp;bad.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/572319iFD810787D7DA527E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 20:14:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8417411#M96308</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-21T20:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8417420#M96309</link>
      <description>&lt;P&gt;here I attached a 2007 version of the tested drawing.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/572326i79B62061129C2B2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 20:16:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8417420#M96309</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-21T20:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8417599#M96310</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1944557"&gt;@Luís&amp;nbsp;Augusto&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;BR /&gt;Try this routine and let us know if it worked.&lt;/P&gt;
&lt;P&gt;Best regards, Luís Augusto&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=17659.0" target="_blank"&gt;http://www.theswamp.org/index.php?topic=17659.0&lt;/A&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Lisp work perfectly.&lt;BR /&gt;thanks for your help.&lt;BR /&gt;&lt;BR /&gt;what I did was load&amp;nbsp; .dcl file to Autocad 2018 path.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 997px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/572362i4EC6A5A8E0D501A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 21:36:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8417599#M96310</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-21T21:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8417615#M96311</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1944557"&gt;@Luís&amp;nbsp;Augusto&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;BR /&gt;Try this routine and let us know if it worked.&lt;/P&gt;
&lt;P&gt;Best regards, Luís Augusto&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=17659.0" target="_blank"&gt;http://www.theswamp.org/index.php?topic=17659.0&lt;/A&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;...I still have a problem more. I need change text, mtext, rtext, dtext and attributes styles from multiple files.&lt;BR /&gt;&lt;BR /&gt;how can I merge multiples styles from multiple drawing?&amp;nbsp;(Batch merge)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 21:42:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8417615#M96311</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-21T21:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8418667#M96312</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I get from your last post ......... (and also your attached drawing).....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp;First have to create a Text Style named "ROMANS" ......with below properties.....&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 621px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/572536i1DBCCBC8359AD693/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; Then&amp;nbsp;&lt;SPAN&gt;change all text, mtext, rtext, dtext .....styles&lt;/SPAN&gt;&amp;nbsp;to that style&amp;nbsp;&lt;SPAN&gt;named "ROMANS"......&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then try this........&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First put all the drawings in a single folder &amp;amp; run the code it will ask&amp;nbsp;to select the Folder Containing the drawings you just select the folder &amp;amp; move forward......Code will work itself on all the drawings in side that folder.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But before running the Lisp make sure about two things-&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1. There is only one Drawing is open (other than any drawing which one you want to edit), otherwise SDI Variable can not be reset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2. Wait for complete execution of the command,&amp;nbsp;&lt;SPAN&gt;otherwise SDI Variable will not restored back.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:CTS ( / sh folder folderobject result)

   (vl-load-com)
   (setq sh (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application" ))
   (setq folder (vlax-invoke-method sh 'BrowseForFolder 0 "" 0 ))
   (vlax-release-object sh)
   (setq SDI_Val (getvar "SDI"))
   (setq LISPI_Val (getvar "LISPINIT"))
   (vl-cmdf "SDI" 1)
   (vl-cmdf "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 NO 0)

	(while (&amp;lt; NO (length Files_Folder))

	(command "fileopen" (strcat result "\\" (nth NO Files_Folder)))

	(entmake (list
             	'(0 . "STYLE")
		'(100 . "AcDbSymbolTableRecord")
		'(100 . "AcDbTextStyleTableRecord")
             	(cons 2 "ROMANS");Text Style Name
		'(70 . 0)
	        '(40 . 0.0)
                '(41 . 1.0)
		'(50 . 0.0)
		'(71 . 0)
		'(42 . 0.09375)
             	(cons 3 "C:\\Windows\\Fonts\\romans.shx")
		'(4 . "")
           	)
	)
	(Setq selectionset (ssget "_A" '((0 . "*TEXT"))))
	(repeat (setq N (sslength selectionset))
		(setq Data (ssname selectionset (setq N (- N 1))))
		(setq EntityData (entget Data))
		(setq Text_Style (cdr (assoc 7 EntityData)))
			(if (/= Text_Style "ROMANS")
				  (entmod (subst (cons 7 "ROMANS")(assoc 7 EntityData)EntityData))
			)
	)

	(vl-cmdf "save" (strcat result "\\" (nth NO Files_Folder)))
	(setq NO (+ 1 NO))
        )
     )
   )
(vl-cmdf "SDI" SDI_Val)
(vl-cmdf "LISPINIT" LISPI_Val)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 12:20:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8418667#M96312</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-11-22T12:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8419514#M96313</link>
      <description>&lt;P&gt;I tried to test your code.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I received this "Cannot run FILEOPEN if SDI mode cannot be established." :&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/572693i6A77DEFEA16A2FF1/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you need more testing from me, let me know I will help much how I can. Or let me know if i did something bad&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 21:19:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8419514#M96313</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-22T21:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8419519#M96314</link>
      <description>&lt;P&gt;You are not in SDI-mode, check your log 6-7 lines above.&lt;/P&gt;
&lt;P&gt;Issue: You have more than one file open, so you can not go to sdi-mode,&lt;/P&gt;
&lt;P&gt;close all files except one of them, then try it again.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 21:25:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8419519#M96314</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2018-11-22T21:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8419548#M96315</link>
      <description>&lt;P&gt;I would try to use ObjectDBX but I'm totally busy right now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the reference of how I would do it:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.lee-mac.com/odbxbase.html" target="_blank"&gt;http://www.lee-mac.com/odbxbase.html&lt;/A&gt;&lt;/P&gt;
&lt;H3&gt;Example 4&lt;/H3&gt;</description>
      <pubDate>Thu, 22 Nov 2018 22:03:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8419548#M96315</guid>
      <dc:creator>Luís Augusto</dc:creator>
      <dc:date>2018-11-22T22:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8421041#M96316</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1944557"&gt;@Luís&amp;nbsp;Augusto&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I would try to use ObjectDBX but I'm totally busy right now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Using ObjectDBX:&lt;BR /&gt;Enter "test" on the command line, choose the folder where all the files are located.&lt;BR /&gt;Attention!&lt;BR /&gt;The routine changes the files and there is no way to reverse the process, so create a copy of your folder before performing the action.&lt;/P&gt;
&lt;P&gt;Best regards, Luís Augusto&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;;;-----------------------=={ ObjectDBX Wrapper }==----------------------;;
;;                                                                      ;;
;;  Evaluates a supplied function on all drawings in a given list or    ;;
;;  selected directory.                                                 ;;
;;----------------------------------------------------------------------;;
;;  Author:  Lee Mac, Copyright © 2013  -  www.lee-mac.com              ;;
;;----------------------------------------------------------------------;;
;;  Arguments:                                                          ;;
;;                                                                      ;;
;;  fun [SYM]                                                           ;;
;;  ---------------------------------                                   ;;
;;  A function requiring a single argument (the VLA Document object),   ;;
;;  and following the 'rules' of ObjectDBX:                             ;;
;;                                                                      ;;
;;  - No SelectionSets               (ssget, ssname, ssdel, etc)        ;;
;;  - No Command Calls               (command "_.line" ... etc)         ;;
;;  - No ent* methods                (entget, entmod, entupd, etc)      ;;
;;  - No Access to System Variables  (setvar, getvar, setvariable, etc) ;;
;;                                                                      ;;
;;  lst [LIST] [Optional]                                               ;;
;;  ---------------------------------                                   ;;
;;  List of DWG Filenames; if nil, BrowseForFolder Dialog is displayed. ;;
;;                                                                      ;;
;;  sav [SYM]                                                           ;;
;;  ---------------------------------                                   ;;
;;  Boolean flag determining whether drawings should be saved following ;;
;;  function evaluation (T=saved, nil=not saved).                       ;;
;;----------------------------------------------------------------------;;
;;  Returns:                                                            ;;
;;                                                                      ;;
;;  List of:                                                            ;;
;;  (                                                                   ;;
;;      (&amp;lt;Drawing Filename&amp;gt; . &amp;lt;Function Result&amp;gt;)                        ;;
;;      (&amp;lt;Drawing Filename&amp;gt; . &amp;lt;Function Result&amp;gt;)                        ;;
;;      ...                                                             ;;
;;      (&amp;lt;Drawing Filename&amp;gt; . &amp;lt;Function Result&amp;gt;)                        ;;
;;  )                                                                   ;;
;;                                                                      ;;
;;  Where:                                                              ;;
;;  &amp;lt;Drawing Filename&amp;gt;                                                  ;;
;;  is the filename of drawing that has been processed.                 ;;
;;                                                                      ;;
;;  &amp;lt;Function Result&amp;gt;                                                   ;;
;;  is the result of evaluating the supplied function on the Document   ;;
;;  Object representing the associated drawing filename.                ;;
;;                                                                      ;;
;;  If an error occurs when evaluating the supplied function the        ;;
;;  Function Result will be nil and the error message will be printed   ;;
;;  to the command-line.                                                ;;
;;----------------------------------------------------------------------;;

(defun LM:ODBX ( fun lst sav / *error* app dbx dir doc dwl err rtn vrs )

    (defun *error* ( msg )
        (if (and (= 'vla-object (type dbx)) (not (vlax-object-released-p dbx)))
            (vlax-release-object dbx)
        )
        (if (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*"))
            (princ (strcat "\nError: " msg))
        )
        (princ)
    )

    (cond
        (   (not
                (or lst
                    (and (setq dir (LM:browseforfolder "Select Folder of Drawings to Process" nil 512))
                         (setq lst (mapcar '(lambda ( x ) (strcat dir "\\" x)) (vl-directory-files dir "*.dwg" 1)))
                    )
                )
            )
            nil
        )
        (   (progn
                (setq dbx
                    (vl-catch-all-apply 'vla-getinterfaceobject
                        (list (setq app (vlax-get-acad-object))
                            (if (&amp;lt; (setq vrs (atoi (getvar 'acadver))) 16)
                                "objectdbx.axdbdocument" (strcat "objectdbx.axdbdocument." (itoa vrs))
                            )
                        )
                    )
                )
                (or (null dbx) (vl-catch-all-error-p dbx))
            )
            (prompt "\nUnable to interface with ObjectDBX.")
        )
        (   t
            (vlax-for doc (vla-get-documents app)
                (setq dwl (cons (cons (strcase (vla-get-fullname doc)) doc) dwl))
            )
            (foreach dwg lst
                (if (or (setq doc (cdr (assoc (strcase dwg) dwl)))
                        (and (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-open (list dbx dwg))))
                             (setq doc dbx)
                        )
                    )
                    (progn
                        (setq rtn
                            (cons
                                (cons dwg
                                    (if (vl-catch-all-error-p (setq err (vl-catch-all-apply fun (list doc))))
                                        (prompt (strcat "\n" dwg "\t" (vl-catch-all-error-message err)))
                                        err
                                    )
                                )
                                rtn
                            )
                        )
                        (if sav (vla-saveas doc dwg))
                    )
                    (princ (strcat "\nError opening file: " (vl-filename-base dwg) ".dwg"))
                )
            )
            (if (= 'vla-object (type dbx))
                (vlax-release-object dbx)
            )
            (reverse rtn)
        )
    )
)

;;------------------=={ Browse for Folder }==-----------------;;
;;                                                            ;;
;;  Displays a dialog prompting the user to select a folder.  ;;
;;------------------------------------------------------------;;
;;  Author: Lee Mac, Copyright © 2013 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;
;;  Arguments:                                                ;;
;;  msg - message to display at top of dialog                 ;;
;;  dir - root directory (or nil)                             ;;
;;  flg - bit-coded flag specifying dialog display settings   ;;
;;------------------------------------------------------------;;
;;  Returns:  Selected folder filepath, else nil.             ;;
;;------------------------------------------------------------;;

(defun LM:browseforfolder ( msg dir flg / err fld pth shl slf )
    (setq err
        (vl-catch-all-apply
            (function
                (lambda ( / app hwd )
                    (if (setq app (vlax-get-acad-object)
                              shl (vla-getinterfaceobject app "shell.application")
                              hwd (vl-catch-all-apply 'vla-get-hwnd (list app))
                              fld (vlax-invoke-method shl 'browseforfolder (if (vl-catch-all-error-p hwd) 0 hwd) msg flg dir)
                        )
                        (setq slf (vlax-get-property fld 'self)
                              pth (vlax-get-property slf 'path)
                              pth (vl-string-right-trim "\\" (vl-string-translate "/" "\\" pth))
                        )
                    )
                )
            )
        )
    )
    (if slf (vlax-release-object slf))
    (if fld (vlax-release-object fld))
    (if shl (vlax-release-object shl))
    (if (vl-catch-all-error-p err)
        (prompt (vl-catch-all-error-message err))
        pth
    )
)

(defun c:test (/ _getattributes data file name)

  (defun Make_ChangeTextStyle (doc / success)
    (if
      (not
	(vl-catch-all-error-p
	  (setq
	    NewTextStyleObj
	     (vl-catch-all-apply
	       'vla-add
	       (list
		 (vla-get-textstyles
		   doc
		 )
		 "NEW_ROMANS_STYLE"
	       )
	     )
	  )
	)
      )
       (progn
	 (vla-put-FontFile
	   NewTextStyleObj
	   "romans.shx"
	 )
	 (vla-put-Width
	   NewTextStyleObj
	   1.0
	 )
	 (vla-put-ObliqueAngle		;radians
	   NewTextStyleObj
	   0.0
	 )
	 (setq success T)
       )
    )

    (if	success
      (progn
	(vlax-for layout (vla-get-layouts doc)
	  (vlax-for object (vla-get-block layout)
	    (if	(vlax-property-available-p object "StyleName")
	      (vla-put-stylename object "NEW_ROMANS_STYLE")
	    )
	  )
	)
	(vlax-for objBlock (vla-get-blocks doc)
	  (if (&amp;gt; (vla-get-count objBlock) 0)
	    (progn
	      (setq objItem (vla-item objBlock 0)
		    entItem (vlax-vla-object-&amp;gt;ename objItem)
	      )
	      (while entItem
		(if
		  (vlax-property-available-p
		    (setq objItem (vlax-ename-&amp;gt;vla-object entItem))
		    "StyleName"
		  )
		   (vla-put-stylename objItem "NEW_ROMANS_STYLE")
		)
		(setq entItem (entnext entItem))
	      )
	    )
	  )
	)
      )
    )
  )

  (LM:ODBX 'Make_ChangeTextStyle nil t)
  
  (princ)
)

(vl-load-com) (princ "C:TEST")
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 17:32:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8421041#M96316</guid>
      <dc:creator>Luís Augusto</dc:creator>
      <dc:date>2018-11-23T17:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8421208#M96317</link>
      <description>&lt;P&gt;I tested in a folder but nothing changed. Maybe I did something&amp;nbsp;bad? check image, please.&lt;/P&gt;
&lt;P&gt;PD: I attached 3 files where I'm testing this code.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/573053i62B630AED0DE3F4E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 19:48:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8421208#M96317</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-23T19:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8421947#M96318</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Please save the files in autoCAD 2013 version.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Nov 2018 13:36:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8421947#M96318</guid>
      <dc:creator>Luís Augusto</dc:creator>
      <dc:date>2018-11-24T13:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8422190#M96319</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1944557"&gt;@Luís&amp;nbsp;Augusto&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;Please save the files in autoCAD 2013 version.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;here attached files where I need work in version AutoCAD 2013&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Nov 2018 18:11:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8422190#M96319</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-24T18:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8425485#M96320</link>
      <description>&lt;P&gt;This new version worked for me.&lt;BR /&gt;Could test and tell me if it works for you?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately the block with the name "CODIGO" that is in the "0.1 ESTACIONAMIENTO" drawing requires the "ATTSYNC" command that is not available in ObjectDBX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards, Luís Augusto&lt;/P&gt;
&lt;PRE&gt;;;-----------------------=={ ObjectDBX Wrapper }==----------------------;;
;;                                                                      ;;
;;  Evaluates a supplied function on all drawings in a given list or    ;;
;;  selected directory.                                                 ;;
;;----------------------------------------------------------------------;;
;;  Author:  Lee Mac, Copyright © 2013  -  www.lee-mac.com              ;;
;;----------------------------------------------------------------------;;
;;  Arguments:                                                          ;;
;;                                                                      ;;
;;  fun [SYM]                                                           ;;
;;  ---------------------------------                                   ;;
;;  A function requiring a single argument (the VLA Document object),   ;;
;;  and following the 'rules' of ObjectDBX:                             ;;
;;                                                                      ;;
;;  - No SelectionSets               (ssget, ssname, ssdel, etc)        ;;
;;  - No Command Calls               (command "_.line" ... etc)         ;;
;;  - No ent* methods                (entget, entmod, entupd, etc)      ;;
;;  - No Access to System Variables  (setvar, getvar, setvariable, etc) ;;
;;                                                                      ;;
;;  lst [LIST] [Optional]                                               ;;
;;  ---------------------------------                                   ;;
;;  List of DWG Filenames; if nil, BrowseForFolder Dialog is displayed. ;;
;;                                                                      ;;
;;  sav [SYM]                                                           ;;
;;  ---------------------------------                                   ;;
;;  Boolean flag determining whether drawings should be saved following ;;
;;  function evaluation (T=saved, nil=not saved).                       ;;
;;----------------------------------------------------------------------;;
;;  Returns:                                                            ;;
;;                                                                      ;;
;;  List of:                                                            ;;
;;  (                                                                   ;;
;;      (&amp;lt;Drawing Filename&amp;gt; . &amp;lt;Function Result&amp;gt;)                        ;;
;;      (&amp;lt;Drawing Filename&amp;gt; . &amp;lt;Function Result&amp;gt;)                        ;;
;;      ...                                                             ;;
;;      (&amp;lt;Drawing Filename&amp;gt; . &amp;lt;Function Result&amp;gt;)                        ;;
;;  )                                                                   ;;
;;                                                                      ;;
;;  Where:                                                              ;;
;;  &amp;lt;Drawing Filename&amp;gt;                                                  ;;
;;  is the filename of drawing that has been processed.                 ;;
;;                                                                      ;;
;;  &amp;lt;Function Result&amp;gt;                                                   ;;
;;  is the result of evaluating the supplied function on the Document   ;;
;;  Object representing the associated drawing filename.                ;;
;;                                                                      ;;
;;  If an error occurs when evaluating the supplied function the        ;;
;;  Function Result will be nil and the error message will be printed   ;;
;;  to the command-line.                                                ;;
;;----------------------------------------------------------------------;;

(defun LM:ODBX (fun lst sav / *error* app dbx dir doc dwl err rtn vrs)

  (defun *error* (msg)
    (if	(and (= 'vla-object (type dbx))
	     (not (vlax-object-released-p dbx))
	)
      (vlax-release-object dbx)
    )
    (if	(not (wcmatch (strcase msg t) "*break,*cancel*,*exit*"))
      (princ (strcat "\nError: " msg))
    )
    (princ)
  )

  (cond
    ((not
       (or lst
	   (and	(setq dir (LM:browseforfolder
			    "Select Folder of Drawings to Process"
			    nil
			    512
			  )
		)
		(setq lst (mapcar '(lambda (x) (strcat dir "\\" x))
				  (vl-directory-files dir "*.dwg" 1)
			  )
		)
	   )
       )
     )
     nil
    )
    ((progn
       (setq dbx
	      (vl-catch-all-apply
		'vla-getinterfaceobject
		(list (setq app (vlax-get-acad-object))
		      (if (&amp;lt; (setq vrs (atoi (getvar 'acadver))) 16)
			"objectdbx.axdbdocument"
			(strcat "objectdbx.axdbdocument." (itoa vrs))
		      )
		)
	      )
       )
       (or (null dbx) (vl-catch-all-error-p dbx))
     )
     (prompt "\nUnable to interface with ObjectDBX.")
    )
    (t
     (vlax-for doc (vla-get-documents app)
       (setq dwl (cons (cons (strcase (vla-get-fullname doc)) doc) dwl))
     )
     (foreach dwg lst
       (if
	 (or (setq doc (cdr (assoc (strcase dwg) dwl)))
	     (and (not (vl-catch-all-error-p
			 (vl-catch-all-apply 'vla-open (list dbx dwg))
		       )
		  )
		  (setq doc dbx)
	     )
	 )
	  (progn
	    (setq rtn
		   (cons
		     (cons dwg
			   (if (vl-catch-all-error-p
				 (setq err (vl-catch-all-apply fun (list doc)))
			       )
			     (prompt (strcat "\n"
					     dwg
					     "\t"
					     (vl-catch-all-error-message err)
				     )
			     )
			     err
			   )
		     )
		     rtn
		   )
	    )
	    (if	sav
	      (vla-saveas doc dwg)
	    )
	  )
	  (princ (strcat "\nError opening file: "
			 (vl-filename-base dwg)
			 ".dwg"
		 )
	  )
       )
     )
     (if (= 'vla-object (type dbx))
       (vlax-release-object dbx)
     )
     (reverse rtn)
    )
  )
)

;;------------------=={ Browse for Folder }==-----------------;;
;;                                                            ;;
;;  Displays a dialog prompting the user to select a folder.  ;;
;;------------------------------------------------------------;;
;;  Author: Lee Mac, Copyright © 2013 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;
;;  Arguments:                                                ;;
;;  msg - message to display at top of dialog                 ;;
;;  dir - root directory (or nil)                             ;;
;;  flg - bit-coded flag specifying dialog display settings   ;;
;;------------------------------------------------------------;;
;;  Returns:  Selected folder filepath, else nil.             ;;
;;------------------------------------------------------------;;

(defun LM:browseforfolder (msg dir flg / err fld pth shl slf)
  (setq	err
	 (vl-catch-all-apply
	   (function
	     (lambda (/ app hwd)
	       (if (setq app (vlax-get-acad-object)
			 shl (vla-getinterfaceobject app "shell.application")
			 hwd (vl-catch-all-apply 'vla-get-hwnd (list app))
			 fld (vlax-invoke-method
			       shl
			       'browseforfolder
			       (if (vl-catch-all-error-p hwd)
				 0
				 hwd
			       )
			       msg
			       flg
			       dir
			     )
		   )
		 (setq slf (vlax-get-property fld 'self)
		       pth (vlax-get-property slf 'path)
		       pth (vl-string-right-trim
			     "\\"
			     (vl-string-translate "/" "\\" pth)
			   )
		 )
	       )
	     )
	   )
	 )
  )
  (if slf
    (vlax-release-object slf)
  )
  (if fld
    (vlax-release-object fld)
  )
  (if shl
    (vlax-release-object shl)
  )
  (if (vl-catch-all-error-p err)
    (prompt (vl-catch-all-error-message err))
    pth
  )
)

(defun c:test (/ _getattributes data file name)

  (defun Make_ChangeTextStyle (doc / success)

    (if
      (not
	(vl-catch-all-error-p
	  (setq
	    NewTextStyleObj
	     (vl-catch-all-apply
	       'vla-add
	       (list
		 (vla-get-textstyles
		   doc
		 )
		 "NEW_ROMANS_STYLE"
	       )
	     )
	  )
	)
      )
       (progn
	 (vla-put-FontFile
	   NewTextStyleObj
	   "romans.shx"
	 )
	 (vla-put-Width
	   NewTextStyleObj
	   1.0
	 )
	 (vla-put-ObliqueAngle		;radians
	   NewTextStyleObj
	   0.0
	 )
	 (setq success T)
       )
    )

    (if	success
      (progn
	(if ACET-UI-PROGRESS-DONE
	  (ACET-UI-PROGRESS-DONE)
	)
	(setq i 0)
	(if acet-ui-progress
	  (acet-ui-progress-init
	    (strcat (vla-get-Name doc) " - Processing Objects...")
	    (vla-get-Count (vla-get-blocks doc))
	  )
	)
	(vlax-for objBlock (vla-get-blocks doc)
	  (if acet-ui-progress
	    (acet-ui-progress-safe (setq i (1+ i)))
	  )

	  (if (&amp;gt; (vla-get-count objBlock) 0)
	    (progn
	      (setq objItem (vla-item objBlock 0)
		    entItem (vlax-vla-object-&amp;gt;ename objItem)
	      )
	      (while entItem

		(if
		  (vlax-property-available-p
		    (setq object (vlax-ename-&amp;gt;vla-object entItem))
		    "StyleName"
		  )
		   (cond
		     (
		      (or
			(wcmatch (vla-get-ObjectName object)
				 "*Dimension"
			)
			(= (vla-get-ObjectName object) "AcDbLeader")
		      )
		      (vl-catch-all-apply
			'vla-put-TextStyle
			(list
			  object
			  "NEW_ROMANS_STYLE"
			)
		      )
		      (vla-Update object)
		     )
		     (
		      (member
			(vla-get-ObjectName object)
			'("AcDbText"
			  "AcDbMText"
			  "AcDbAttributeDefinition"
			  "AcDbAttributeReference"
			 )
		      )
		      (vl-catch-all-apply
			'vla-put-stylename
			(list
			  object
			  "NEW_ROMANS_STYLE"
			)
		      )
		      (vla-Update object)
		     )
		   )
		)
		(setq entItem (entnext entItem))
	      )
	    )
	  )
	)
	(if ACET-UI-PROGRESS-DONE
	  (ACET-UI-PROGRESS-DONE)
	)
      )
    )
  )

  (LM:ODBX 'Make_ChangeTextStyle nil t)
  (princ "Processing completed")
  (princ)
)

(vl-load-com)
(princ "C:TEST")
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 19:10:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8425485#M96320</guid>
      <dc:creator>Luís Augusto</dc:creator>
      <dc:date>2018-11-26T19:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8431319#M96321</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1944557"&gt;@Luís&amp;nbsp;Augusto&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;This new version worked for me.&lt;BR /&gt;Could test and tell me if it works for you?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately the block with the name "CODIGO" that is in the "0.1 ESTACIONAMIENTO" drawing requires the "ATTSYNC" command that is not available in ObjectDBX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards, Luís Augusto&lt;/P&gt;
&lt;PRE&gt;;;-----------------------=={ ObjectDBX Wrapper }==----------------------;;
;;                                                                      ;;
;;  Evaluates a supplied function on all drawings in a given list or    ;;
;;  selected directory.                                                 ;;
;;----------------------------------------------------------------------;;
;;  Author:  Lee Mac, Copyright © 2013  -  www.lee-mac.com              ;;
;;----------------------------------------------------------------------;;
;;  Arguments:                                                          ;;
;;                                                                      ;;
;;  fun [SYM]                                                           ;;
;;  ---------------------------------                                   ;;
;;  A function requiring a single argument (the VLA Document object),   ;;
;;  and following the 'rules' of ObjectDBX:                             ;;
;;                                                                      ;;
;;  - No SelectionSets               (ssget, ssname, ssdel, etc)        ;;
;;  - No Command Calls               (command "_.line" ... etc)         ;;
;;  - No ent* methods                (entget, entmod, entupd, etc)      ;;
;;  - No Access to System Variables  (setvar, getvar, setvariable, etc) ;;
;;                                                                      ;;
;;  lst [LIST] [Optional]                                               ;;
;;  ---------------------------------                                   ;;
;;  List of DWG Filenames; if nil, BrowseForFolder Dialog is displayed. ;;
;;                                                                      ;;
;;  sav [SYM]                                                           ;;
;;  ---------------------------------                                   ;;
;;  Boolean flag determining whether drawings should be saved following ;;
;;  function evaluation (T=saved, nil=not saved).                       ;;
;;----------------------------------------------------------------------;;
;;  Returns:                                                            ;;
;;                                                                      ;;
;;  List of:                                                            ;;
;;  (                                                                   ;;
;;      (&amp;lt;Drawing Filename&amp;gt; . &amp;lt;Function Result&amp;gt;)                        ;;
;;      (&amp;lt;Drawing Filename&amp;gt; . &amp;lt;Function Result&amp;gt;)                        ;;
;;      ...                                                             ;;
;;      (&amp;lt;Drawing Filename&amp;gt; . &amp;lt;Function Result&amp;gt;)                        ;;
;;  )                                                                   ;;
;;                                                                      ;;
;;  Where:                                                              ;;
;;  &amp;lt;Drawing Filename&amp;gt;                                                  ;;
;;  is the filename of drawing that has been processed.                 ;;
;;                                                                      ;;
;;  &amp;lt;Function Result&amp;gt;                                                   ;;
;;  is the result of evaluating the supplied function on the Document   ;;
;;  Object representing the associated drawing filename.                ;;
;;                                                                      ;;
;;  If an error occurs when evaluating the supplied function the        ;;
;;  Function Result will be nil and the error message will be printed   ;;
;;  to the command-line.                                                ;;
;;----------------------------------------------------------------------;;

(defun LM:ODBX (fun lst sav / *error* app dbx dir doc dwl err rtn vrs)

  (defun *error* (msg)
    (if	(and (= 'vla-object (type dbx))
	     (not (vlax-object-released-p dbx))
	)
      (vlax-release-object dbx)
    )
    (if	(not (wcmatch (strcase msg t) "*break,*cancel*,*exit*"))
      (princ (strcat "\nError: " msg))
    )
    (princ)
  )

  (cond
    ((not
       (or lst
	   (and	(setq dir (LM:browseforfolder
			    "Select Folder of Drawings to Process"
			    nil
			    512
			  )
		)
		(setq lst (mapcar '(lambda (x) (strcat dir "\\" x))
				  (vl-directory-files dir "*.dwg" 1)
			  )
		)
	   )
       )
     )
     nil
    )
    ((progn
       (setq dbx
	      (vl-catch-all-apply
		'vla-getinterfaceobject
		(list (setq app (vlax-get-acad-object))
		      (if (&amp;lt; (setq vrs (atoi (getvar 'acadver))) 16)
			"objectdbx.axdbdocument"
			(strcat "objectdbx.axdbdocument." (itoa vrs))
		      )
		)
	      )
       )
       (or (null dbx) (vl-catch-all-error-p dbx))
     )
     (prompt "\nUnable to interface with ObjectDBX.")
    )
    (t
     (vlax-for doc (vla-get-documents app)
       (setq dwl (cons (cons (strcase (vla-get-fullname doc)) doc) dwl))
     )
     (foreach dwg lst
       (if
	 (or (setq doc (cdr (assoc (strcase dwg) dwl)))
	     (and (not (vl-catch-all-error-p
			 (vl-catch-all-apply 'vla-open (list dbx dwg))
		       )
		  )
		  (setq doc dbx)
	     )
	 )
	  (progn
	    (setq rtn
		   (cons
		     (cons dwg
			   (if (vl-catch-all-error-p
				 (setq err (vl-catch-all-apply fun (list doc)))
			       )
			     (prompt (strcat "\n"
					     dwg
					     "\t"
					     (vl-catch-all-error-message err)
				     )
			     )
			     err
			   )
		     )
		     rtn
		   )
	    )
	    (if	sav
	      (vla-saveas doc dwg)
	    )
	  )
	  (princ (strcat "\nError opening file: "
			 (vl-filename-base dwg)
			 ".dwg"
		 )
	  )
       )
     )
     (if (= 'vla-object (type dbx))
       (vlax-release-object dbx)
     )
     (reverse rtn)
    )
  )
)

;;------------------=={ Browse for Folder }==-----------------;;
;;                                                            ;;
;;  Displays a dialog prompting the user to select a folder.  ;;
;;------------------------------------------------------------;;
;;  Author: Lee Mac, Copyright © 2013 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;
;;  Arguments:                                                ;;
;;  msg - message to display at top of dialog                 ;;
;;  dir - root directory (or nil)                             ;;
;;  flg - bit-coded flag specifying dialog display settings   ;;
;;------------------------------------------------------------;;
;;  Returns:  Selected folder filepath, else nil.             ;;
;;------------------------------------------------------------;;

(defun LM:browseforfolder (msg dir flg / err fld pth shl slf)
  (setq	err
	 (vl-catch-all-apply
	   (function
	     (lambda (/ app hwd)
	       (if (setq app (vlax-get-acad-object)
			 shl (vla-getinterfaceobject app "shell.application")
			 hwd (vl-catch-all-apply 'vla-get-hwnd (list app))
			 fld (vlax-invoke-method
			       shl
			       'browseforfolder
			       (if (vl-catch-all-error-p hwd)
				 0
				 hwd
			       )
			       msg
			       flg
			       dir
			     )
		   )
		 (setq slf (vlax-get-property fld 'self)
		       pth (vlax-get-property slf 'path)
		       pth (vl-string-right-trim
			     "\\"
			     (vl-string-translate "/" "\\" pth)
			   )
		 )
	       )
	     )
	   )
	 )
  )
  (if slf
    (vlax-release-object slf)
  )
  (if fld
    (vlax-release-object fld)
  )
  (if shl
    (vlax-release-object shl)
  )
  (if (vl-catch-all-error-p err)
    (prompt (vl-catch-all-error-message err))
    pth
  )
)

(defun c:test (/ _getattributes data file name)

  (defun Make_ChangeTextStyle (doc / success)

    (if
      (not
	(vl-catch-all-error-p
	  (setq
	    NewTextStyleObj
	     (vl-catch-all-apply
	       'vla-add
	       (list
		 (vla-get-textstyles
		   doc
		 )
		 "NEW_ROMANS_STYLE"
	       )
	     )
	  )
	)
      )
       (progn
	 (vla-put-FontFile
	   NewTextStyleObj
	   "romans.shx"
	 )
	 (vla-put-Width
	   NewTextStyleObj
	   1.0
	 )
	 (vla-put-ObliqueAngle		;radians
	   NewTextStyleObj
	   0.0
	 )
	 (setq success T)
       )
    )

    (if	success
      (progn
	(if ACET-UI-PROGRESS-DONE
	  (ACET-UI-PROGRESS-DONE)
	)
	(setq i 0)
	(if acet-ui-progress
	  (acet-ui-progress-init
	    (strcat (vla-get-Name doc) " - Processing Objects...")
	    (vla-get-Count (vla-get-blocks doc))
	  )
	)
	(vlax-for objBlock (vla-get-blocks doc)
	  (if acet-ui-progress
	    (acet-ui-progress-safe (setq i (1+ i)))
	  )

	  (if (&amp;gt; (vla-get-count objBlock) 0)
	    (progn
	      (setq objItem (vla-item objBlock 0)
		    entItem (vlax-vla-object-&amp;gt;ename objItem)
	      )
	      (while entItem

		(if
		  (vlax-property-available-p
		    (setq object (vlax-ename-&amp;gt;vla-object entItem))
		    "StyleName"
		  )
		   (cond
		     (
		      (or
			(wcmatch (vla-get-ObjectName object)
				 "*Dimension"
			)
			(= (vla-get-ObjectName object) "AcDbLeader")
		      )
		      (vl-catch-all-apply
			'vla-put-TextStyle
			(list
			  object
			  "NEW_ROMANS_STYLE"
			)
		      )
		      (vla-Update object)
		     )
		     (
		      (member
			(vla-get-ObjectName object)
			'("AcDbText"
			  "AcDbMText"
			  "AcDbAttributeDefinition"
			  "AcDbAttributeReference"
			 )
		      )
		      (vl-catch-all-apply
			'vla-put-stylename
			(list
			  object
			  "NEW_ROMANS_STYLE"
			)
		      )
		      (vla-Update object)
		     )
		   )
		)
		(setq entItem (entnext entItem))
	      )
	    )
	  )
	)
	(if ACET-UI-PROGRESS-DONE
	  (ACET-UI-PROGRESS-DONE)
	)
      )
    )
  )

  (LM:ODBX 'Make_ChangeTextStyle nil t)
  (princ "Processing completed")
  (princ)
)

(vl-load-com)
(princ "C:TEST")
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;recently I code and work perfectly. thanks a lot.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 20:03:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/8431319#M96321</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-11-28T20:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Request for a Lisp to batch change all drawing text styles to any style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/12335898#M96322</link>
      <description>&lt;P&gt;I wanted to see if there was a way to modify this script so that you're only changing a singular text style in a batch of dwg files within a singular folder. The issue we have is that a text style was defined incorrectly in a template using a bolded font - but it should be regular. trying to use a lisp or something to do it en mass vs opening up 50 dwg files in this specific project but anywhere else it has occurred too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so for example - the lisp would still launch the same by letting you select the folder that contains all the dwg files, but instead of moving everything to "TEXT UPDATED", it would only change objects using "TEXT BOLD"&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 15:39:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/request-for-a-lisp-to-batch-change-all-drawing-text-styles-to/m-p/12335898#M96322</guid>
      <dc:creator>Jason_Grubaugh</dc:creator>
      <dc:date>2023-10-27T15:39:24Z</dc:date>
    </item>
  </channel>
</rss>

