<?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: in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317221#M94865</link>
    <description>Gee thanks.  That is REAL fast.  Mike Weaver tried to put me onto this before.  I should&lt;BR /&gt;
have listened a little more.&lt;BR /&gt;
&lt;BR /&gt;
jim</description>
    <pubDate>Thu, 09 Mar 2000 03:31:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2000-03-09T03:31:48Z</dc:date>
    <item>
      <title>BatchFile text size example</title>
      <link>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317216#M94860</link>
      <description>'With help from one and all I got a Batch file going.  This&lt;BR /&gt;
'one gets a Dir  and new textsize from the user, then modifys the text,&lt;BR /&gt;
'and resaves each dwg.   I did 80 dwg's with it. I got pretty interested&lt;BR /&gt;
&lt;BR /&gt;
'in batch files doing 'this.  If anyone has any other nice batch files&lt;BR /&gt;
'kicking around I would enjoy to receive them here or at my own e-mail&lt;BR /&gt;
'Thanks all, and good luck!     jim kitts&lt;BR /&gt;
'Paste this into a module, then 'vbarun' at the command line&lt;BR /&gt;
'&lt;BR /&gt;
Dim TextSize As String 'load in 'SetCadBatch()&lt;BR /&gt;
'TextSize used in SizeTxt()&lt;BR /&gt;
Sub SetCadBatch()&lt;BR /&gt;
'Ck if a live ACADDoc exists or make one&lt;BR /&gt;
'get data from input boxs and trap errors&lt;BR /&gt;
'jimbo\3:00 pm 3/6/00&lt;BR /&gt;
'C:\JimJunk\Fundy4\X2 'my Fundy Park test file&lt;BR /&gt;
'if user killed all dwg's add&lt;BR /&gt;
'a blank to prevent an error&lt;BR /&gt;
If Application.Documents.Count = 0 Then&lt;BR /&gt;
 Dim docObjNew As AcadDocument&lt;BR /&gt;
 Set docObjNew = Application.Documents.Add&lt;BR /&gt;
End If&lt;BR /&gt;
'at least one dwg is loaded&lt;BR /&gt;
'so chose a drawing file&lt;BR /&gt;
Dim dwgName As String&lt;BR /&gt;
Dim msg As String: Dim title As String&lt;BR /&gt;
msg = "Where is the Batch Directory?"&lt;BR /&gt;
title = "Give it to me, baby!"&lt;BR /&gt;
Dim inDir As String&lt;BR /&gt;
 inDir = InputBox(msg, title)&lt;BR /&gt;
'check for a cancel&lt;BR /&gt;
If inDir = "" Then&lt;BR /&gt;
Exit Sub&lt;BR /&gt;
End If&lt;BR /&gt;
'ck if file exists if not, then exit&lt;BR /&gt;
Dim tmp As String&lt;BR /&gt;
temp = Dir$(inDir &amp;amp; "\*.dwg")&lt;BR /&gt;
If temp = "" Then&lt;BR /&gt;
MsgBox "Ain't no dwg here!"&lt;BR /&gt;
Exit Sub&lt;BR /&gt;
End If&lt;BR /&gt;
msg = "What size do you want your text?"&lt;BR /&gt;
title = "New Text Size"&lt;BR /&gt;
TextSize = InputBox(msg, title) 'Dim in Declare&lt;BR /&gt;
If TextSize = "" Then&lt;BR /&gt;
Exit Sub 'trap cancel&lt;BR /&gt;
End If&lt;BR /&gt;
If Not IsNumeric(TextSize) Then 'trap text&lt;BR /&gt;
MsgBox "Gotta give a number..."&lt;BR /&gt;
Exit Sub&lt;BR /&gt;
End If '&lt;BR /&gt;
'loop through the files:&lt;BR /&gt;
Dim filenom As String&lt;BR /&gt;
filenom = Dir$(inDir &amp;amp; "\*.dwg")&lt;BR /&gt;
 Do While filenom &amp;lt;&amp;gt; ""&lt;BR /&gt;
 Dim WholeFile As String&lt;BR /&gt;
 WholeFile = inDir &amp;amp; "\" &amp;amp; filenom&lt;BR /&gt;
'do somthin next&lt;BR /&gt;
DoEvents&lt;BR /&gt;
ThisDrawing.Application.Documents.Open WholeFile&lt;BR /&gt;
DoEvents&lt;BR /&gt;
Call SizeTxt  'reach out for the main routine&lt;BR /&gt;
ThisDrawing.Close (True) ' gives a save&lt;BR /&gt;
DoEvents&lt;BR /&gt;
'end do somethin part&lt;BR /&gt;
'set tmp to loop through again&lt;BR /&gt;
filenom = Dir$&lt;BR /&gt;
Loop&lt;BR /&gt;
End Sub&lt;BR /&gt;
'&lt;BR /&gt;
Private Sub SizeTxt()&lt;BR /&gt;
Dim elem As Object&lt;BR /&gt;
Dim found As Boolean&lt;BR /&gt;
' this is from the Acad examples&lt;BR /&gt;
'Cycle through the entities in the ModelSpace&lt;BR /&gt;
For Each elem In ThisDrawing.ModelSpace&lt;BR /&gt;
With elem&lt;BR /&gt;
If (.EntityName = "AcDbText") Or (.EntityName = "AcDbMText") Then&lt;BR /&gt;
' Change the height of the text entity&lt;BR /&gt;
.Height = TextSize '0.5 'dim in declarations&lt;BR /&gt;
.Update&lt;BR /&gt;
found = True&lt;BR /&gt;
End If&lt;BR /&gt;
End With&lt;BR /&gt;
Set elem = Nothing&lt;BR /&gt;
Next elem&lt;BR /&gt;
' If we didn't find text, notify user&lt;BR /&gt;
If Not found Then&lt;BR /&gt;
MsgBox "No text found in ModelSpace.", vbInformation&lt;BR /&gt;
End If&lt;BR /&gt;
End Sub&lt;BR /&gt;
'done for now, jim kitts</description>
      <pubDate>Tue, 07 Mar 2000 15:49:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317216#M94860</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-03-07T15:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: BatchFile text size example</title>
      <link>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317217#M94861</link>
      <description>Here is an alternative way by using ObjectDBX via axdb15.dll.&lt;BR /&gt;
&lt;BR /&gt;
I runs really quick!&lt;BR /&gt;
&lt;BR /&gt;
' Written by Jimmy B 2000-03-08 &lt;BR /&gt;
' Runs in AutoCAD 2000 with axdb15.dll&lt;BR /&gt;
' Example of batch for changing text height on all drawings in a directory.&lt;BR /&gt;
&lt;BR /&gt;
Private Sub setTextHeight()&lt;BR /&gt;
Set objDbx = GetInterfaceObject("ObjectDBX.AxDbDocument")&lt;BR /&gt;
Dim inDir As String&lt;BR /&gt;
Dim elem As Object&lt;BR /&gt;
Dim filenom As String&lt;BR /&gt;
Dim WholeFile As String&lt;BR /&gt;
Dim newHeight As Double&lt;BR /&gt;
inDir = "c:\test"&lt;BR /&gt;
filenom = Dir$(inDir &amp;amp; "\*.dwg")&lt;BR /&gt;
newHeight = 3#&lt;BR /&gt;
Do While filenom &amp;lt;&amp;gt; ""&lt;BR /&gt;
    WholeFile = inDir &amp;amp; "\" &amp;amp; filenom&lt;BR /&gt;
    objDbx.Open WholeFile&lt;BR /&gt;
    For Each elem In objDbx.ModelSpace&lt;BR /&gt;
        With elem&lt;BR /&gt;
            If ((TypeName(elem) = "IAcadText") Or (TypeName(elem) = "IAcadMText")) Then&lt;BR /&gt;
                .Height = newHeight&lt;BR /&gt;
            End If&lt;BR /&gt;
        End With&lt;BR /&gt;
    Next elem&lt;BR /&gt;
    For Each elem In objDbx.PaperSpace&lt;BR /&gt;
        With elem&lt;BR /&gt;
            If ((TypeName(elem) = "IAcadText") Or (TypeName(elem) = "IAcadMText")) Then&lt;BR /&gt;
                .Height = newHeight&lt;BR /&gt;
            End If&lt;BR /&gt;
        End With&lt;BR /&gt;
    Next elem&lt;BR /&gt;
    Set elem = Nothing&lt;BR /&gt;
    objDbx.SaveAs WholeFile&lt;BR /&gt;
    filenom = Dir$&lt;BR /&gt;
Loop&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Best regards: Jimmy B&lt;BR /&gt;
CAD coordinator at Emtunga International AB&lt;BR /&gt;
www.emtunga.com</description>
      <pubDate>Wed, 08 Mar 2000 03:56:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317217#M94861</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-03-08T03:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: BatchFile text size example</title>
      <link>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317218#M94862</link>
      <description>Nice example.&lt;BR /&gt;
&lt;BR /&gt;
Something you might consider that will speed this up:  do the update after&lt;BR /&gt;
looping through all of the entities.  As I understand it, update is the same&lt;BR /&gt;
thing as a regen.  If you do it once when you're all done processing then&lt;BR /&gt;
that's all it takes; one regen of the entire drawing instead of regen each&lt;BR /&gt;
object as you go along.&lt;BR /&gt;
&lt;BR /&gt;
Just a  suggestion.&lt;BR /&gt;
&lt;BR /&gt;
Mike&lt;BR /&gt;
&lt;BR /&gt;
"Ruth Mitchell or Jim Kitts" &lt;RUTHJIM&gt; wrote in message&lt;BR /&gt;
news:38C52501.429F75F8@nbnet.nb.ca...&lt;BR /&gt;
&amp;gt; 'With help from one and all I got a Batch file going.  This&lt;BR /&gt;
&amp;gt; 'one gets a Dir  and new textsize from the user, then modifys the text,&lt;BR /&gt;
&amp;gt; 'and resaves each dwg.   I did 80 dwg's with it. I got pretty interested&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; 'in batch files doing 'this.  If anyone has any other nice batch files&lt;BR /&gt;
&amp;gt; 'kicking around I would enjoy to receive them here or at my own e-mail&lt;BR /&gt;
&amp;gt; 'Thanks all, and good luck!     jim kitts&lt;BR /&gt;
&amp;gt; 'Paste this into a module, then 'vbarun' at the command line&lt;BR /&gt;
&amp;gt; '&lt;BR /&gt;
&amp;gt; Dim TextSize As String 'load in 'SetCadBatch()&lt;BR /&gt;
&amp;gt; 'TextSize used in SizeTxt()&lt;BR /&gt;
&amp;gt; Sub SetCadBatch()&lt;BR /&gt;
&amp;gt; 'Ck if a live ACADDoc exists or make one&lt;BR /&gt;
&amp;gt; 'get data from input boxs and trap errors&lt;BR /&gt;
&amp;gt; 'jimbo\3:00 pm 3/6/00&lt;BR /&gt;
&amp;gt; 'C:\JimJunk\Fundy4\X2 'my Fundy Park test file&lt;BR /&gt;
&amp;gt; 'if user killed all dwg's add&lt;BR /&gt;
&amp;gt; 'a blank to prevent an error&lt;BR /&gt;
&amp;gt; If Application.Documents.Count = 0 Then&lt;BR /&gt;
&amp;gt;  Dim docObjNew As AcadDocument&lt;BR /&gt;
&amp;gt;  Set docObjNew = Application.Documents.Add&lt;BR /&gt;
&amp;gt; End If&lt;BR /&gt;
&amp;gt; 'at least one dwg is loaded&lt;BR /&gt;
&amp;gt; 'so chose a drawing file&lt;BR /&gt;
&amp;gt; Dim dwgName As String&lt;BR /&gt;
&amp;gt; Dim msg As String: Dim title As String&lt;BR /&gt;
&amp;gt; msg = "Where is the Batch Directory?"&lt;BR /&gt;
&amp;gt; title = "Give it to me, baby!"&lt;BR /&gt;
&amp;gt; Dim inDir As String&lt;BR /&gt;
&amp;gt;  inDir = InputBox(msg, title)&lt;BR /&gt;
&amp;gt; 'check for a cancel&lt;BR /&gt;
&amp;gt; If inDir = "" Then&lt;BR /&gt;
&amp;gt; Exit Sub&lt;BR /&gt;
&amp;gt; End If&lt;BR /&gt;
&amp;gt; 'ck if file exists if not, then exit&lt;BR /&gt;
&amp;gt; Dim tmp As String&lt;BR /&gt;
&amp;gt; temp = Dir$(inDir &amp;amp; "\*.dwg")&lt;BR /&gt;
&amp;gt; If temp = "" Then&lt;BR /&gt;
&amp;gt; MsgBox "Ain't no dwg here!"&lt;BR /&gt;
&amp;gt; Exit Sub&lt;BR /&gt;
&amp;gt; End If&lt;BR /&gt;
&amp;gt; msg = "What size do you want your text?"&lt;BR /&gt;
&amp;gt; title = "New Text Size"&lt;BR /&gt;
&amp;gt; TextSize = InputBox(msg, title) 'Dim in Declare&lt;BR /&gt;
&amp;gt; If TextSize = "" Then&lt;BR /&gt;
&amp;gt; Exit Sub 'trap cancel&lt;BR /&gt;
&amp;gt; End If&lt;BR /&gt;
&amp;gt; If Not IsNumeric(TextSize) Then 'trap text&lt;BR /&gt;
&amp;gt; MsgBox "Gotta give a number..."&lt;BR /&gt;
&amp;gt; Exit Sub&lt;BR /&gt;
&amp;gt; End If '&lt;BR /&gt;
&amp;gt; 'loop through the files:&lt;BR /&gt;
&amp;gt; Dim filenom As String&lt;BR /&gt;
&amp;gt; filenom = Dir$(inDir &amp;amp; "\*.dwg")&lt;BR /&gt;
&amp;gt;  Do While filenom &amp;lt;&amp;gt; ""&lt;BR /&gt;
&amp;gt;  Dim WholeFile As String&lt;BR /&gt;
&amp;gt;  WholeFile = inDir &amp;amp; "\" &amp;amp; filenom&lt;BR /&gt;
&amp;gt; 'do somthin next&lt;BR /&gt;
&amp;gt; DoEvents&lt;BR /&gt;
&amp;gt; ThisDrawing.Application.Documents.Open WholeFile&lt;BR /&gt;
&amp;gt; DoEvents&lt;BR /&gt;
&amp;gt; Call SizeTxt  'reach out for the main routine&lt;BR /&gt;
&amp;gt; ThisDrawing.Close (True) ' gives a save&lt;BR /&gt;
&amp;gt; DoEvents&lt;BR /&gt;
&amp;gt; 'end do somethin part&lt;BR /&gt;
&amp;gt; 'set tmp to loop through again&lt;BR /&gt;
&amp;gt; filenom = Dir$&lt;BR /&gt;
&amp;gt; Loop&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt; '&lt;BR /&gt;
&amp;gt; Private Sub SizeTxt()&lt;BR /&gt;
&amp;gt; Dim elem As Object&lt;BR /&gt;
&amp;gt; Dim found As Boolean&lt;BR /&gt;
&amp;gt; ' this is from the Acad examples&lt;BR /&gt;
&amp;gt; 'Cycle through the entities in the ModelSpace&lt;BR /&gt;
&amp;gt; For Each elem In ThisDrawing.ModelSpace&lt;BR /&gt;
&amp;gt; With elem&lt;BR /&gt;
&amp;gt; If (.EntityName = "AcDbText") Or (.EntityName = "AcDbMText") Then&lt;BR /&gt;
&amp;gt; ' Change the height of the text entity&lt;BR /&gt;
&amp;gt; .Height = TextSize '0.5 'dim in declarations&lt;BR /&gt;
&amp;gt; .Update&lt;BR /&gt;
&amp;gt; found = True&lt;BR /&gt;
&amp;gt; End If&lt;BR /&gt;
&amp;gt; End With&lt;BR /&gt;
&amp;gt; Set elem = Nothing&lt;BR /&gt;
&amp;gt; Next elem&lt;BR /&gt;
&amp;gt; ' If we didn't find text, notify user&lt;BR /&gt;
&amp;gt; If Not found Then&lt;BR /&gt;
&amp;gt; MsgBox "No text found in ModelSpace.", vbInformation&lt;BR /&gt;
&amp;gt; End If&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt; 'done for now, jim kitts&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/RUTHJIM&gt;</description>
      <pubDate>Wed, 08 Mar 2000 14:42:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317218#M94862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-03-08T14:42:47Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317219#M94863</link>
      <description>My guess is that no update or regen is needed at all since the drawing is closed and saved.&lt;BR /&gt;
&lt;BR /&gt;
Anyway: "The Update method updates the display of a single object only. The Regen&lt;BR /&gt;
method regenerates the entire drawing and recomputes the screen coordi-nates&lt;BR /&gt;
and view resolution for all objects. It also reindexes the drawing&lt;BR /&gt;
database for optimum display and object selection performance."&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Best regards: Jimmy B&lt;BR /&gt;
CAD coordinator at Emtunga International AB&lt;BR /&gt;
www.emtunga.com&lt;BR /&gt;
Michael Weaver &lt;MWEAVER&gt; skrev i diskussionsgruppsmeddelandet:8a5ou8$7vr11@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Nice example.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Something you might consider that will speed this up:  do the update after&lt;BR /&gt;
&amp;gt; looping through all of the entities.  As I understand it, update is the same&lt;BR /&gt;
&amp;gt; thing as a regen.  If you do it once when you're all done processing then&lt;BR /&gt;
&amp;gt; that's all it takes; one regen of the entire drawing instead of regen each&lt;BR /&gt;
&amp;gt; object as you go along.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Just a  suggestion.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Mike&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; "Ruth Mitchell or Jim Kitts" &lt;RUTHJIM&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:38C52501.429F75F8@nbnet.nb.ca...&lt;BR /&gt;
&amp;gt; &amp;gt; 'With help from one and all I got a Batch file going.  This&lt;BR /&gt;
&amp;gt; &amp;gt; 'one gets a Dir  and new textsize from the user, then modifys the text,&lt;BR /&gt;
&amp;gt; &amp;gt; 'and resaves each dwg.   I did 80 dwg's with it. I got pretty interested&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; 'in batch files doing 'this.  If anyone has any other nice batch files&lt;BR /&gt;
&amp;gt; &amp;gt; 'kicking around I would enjoy to receive them here or at my own e-mail&lt;BR /&gt;
&amp;gt; &amp;gt; 'Thanks all, and good luck!     jim kitts&lt;BR /&gt;
&amp;gt; &amp;gt; 'Paste this into a module, then 'vbarun' at the command line&lt;BR /&gt;
&amp;gt; &amp;gt; '&lt;BR /&gt;
&amp;gt; &amp;gt; Dim TextSize As String 'load in 'SetCadBatch()&lt;BR /&gt;
&amp;gt; &amp;gt; 'TextSize used in SizeTxt()&lt;BR /&gt;
&amp;gt; &amp;gt; Sub SetCadBatch()&lt;BR /&gt;
&amp;gt; &amp;gt; 'Ck if a live ACADDoc exists or make one&lt;BR /&gt;
&amp;gt; &amp;gt; 'get data from input boxs and trap errors&lt;BR /&gt;
&amp;gt; &amp;gt; 'jimbo\3:00 pm 3/6/00&lt;BR /&gt;
&amp;gt; &amp;gt; 'C:\JimJunk\Fundy4\X2 'my Fundy Park test file&lt;BR /&gt;
&amp;gt; &amp;gt; 'if user killed all dwg's add&lt;BR /&gt;
&amp;gt; &amp;gt; 'a blank to prevent an error&lt;BR /&gt;
&amp;gt; &amp;gt; If Application.Documents.Count = 0 Then&lt;BR /&gt;
&amp;gt; &amp;gt;  Dim docObjNew As AcadDocument&lt;BR /&gt;
&amp;gt; &amp;gt;  Set docObjNew = Application.Documents.Add&lt;BR /&gt;
&amp;gt; &amp;gt; End If&lt;BR /&gt;
&amp;gt; &amp;gt; 'at least one dwg is loaded&lt;BR /&gt;
&amp;gt; &amp;gt; 'so chose a drawing file&lt;BR /&gt;
&amp;gt; &amp;gt; Dim dwgName As String&lt;BR /&gt;
&amp;gt; &amp;gt; Dim msg As String: Dim title As String&lt;BR /&gt;
&amp;gt; &amp;gt; msg = "Where is the Batch Directory?"&lt;BR /&gt;
&amp;gt; &amp;gt; title = "Give it to me, baby!"&lt;BR /&gt;
&amp;gt; &amp;gt; Dim inDir As String&lt;BR /&gt;
&amp;gt; &amp;gt;  inDir = InputBox(msg, title)&lt;BR /&gt;
&amp;gt; &amp;gt; 'check for a cancel&lt;BR /&gt;
&amp;gt; &amp;gt; If inDir = "" Then&lt;BR /&gt;
&amp;gt; &amp;gt; Exit Sub&lt;BR /&gt;
&amp;gt; &amp;gt; End If&lt;BR /&gt;
&amp;gt; &amp;gt; 'ck if file exists if not, then exit&lt;BR /&gt;
&amp;gt; &amp;gt; Dim tmp As String&lt;BR /&gt;
&amp;gt; &amp;gt; temp = Dir$(inDir &amp;amp; "\*.dwg")&lt;BR /&gt;
&amp;gt; &amp;gt; If temp = "" Then&lt;BR /&gt;
&amp;gt; &amp;gt; MsgBox "Ain't no dwg here!"&lt;BR /&gt;
&amp;gt; &amp;gt; Exit Sub&lt;BR /&gt;
&amp;gt; &amp;gt; End If&lt;BR /&gt;
&amp;gt; &amp;gt; msg = "What size do you want your text?"&lt;BR /&gt;
&amp;gt; &amp;gt; title = "New Text Size"&lt;BR /&gt;
&amp;gt; &amp;gt; TextSize = InputBox(msg, title) 'Dim in Declare&lt;BR /&gt;
&amp;gt; &amp;gt; If TextSize = "" Then&lt;BR /&gt;
&amp;gt; &amp;gt; Exit Sub 'trap cancel&lt;BR /&gt;
&amp;gt; &amp;gt; End If&lt;BR /&gt;
&amp;gt; &amp;gt; If Not IsNumeric(TextSize) Then 'trap text&lt;BR /&gt;
&amp;gt; &amp;gt; MsgBox "Gotta give a number..."&lt;BR /&gt;
&amp;gt; &amp;gt; Exit Sub&lt;BR /&gt;
&amp;gt; &amp;gt; End If '&lt;BR /&gt;
&amp;gt; &amp;gt; 'loop through the files:&lt;BR /&gt;
&amp;gt; &amp;gt; Dim filenom As String&lt;BR /&gt;
&amp;gt; &amp;gt; filenom = Dir$(inDir &amp;amp; "\*.dwg")&lt;BR /&gt;
&amp;gt; &amp;gt;  Do While filenom &amp;lt;&amp;gt; ""&lt;BR /&gt;
&amp;gt; &amp;gt;  Dim WholeFile As String&lt;BR /&gt;
&amp;gt; &amp;gt;  WholeFile = inDir &amp;amp; "\" &amp;amp; filenom&lt;BR /&gt;
&amp;gt; &amp;gt; 'do somthin next&lt;BR /&gt;
&amp;gt; &amp;gt; DoEvents&lt;BR /&gt;
&amp;gt; &amp;gt; ThisDrawing.Application.Documents.Open WholeFile&lt;BR /&gt;
&amp;gt; &amp;gt; DoEvents&lt;BR /&gt;
&amp;gt; &amp;gt; Call SizeTxt  'reach out for the main routine&lt;BR /&gt;
&amp;gt; &amp;gt; ThisDrawing.Close (True) ' gives a save&lt;BR /&gt;
&amp;gt; &amp;gt; DoEvents&lt;BR /&gt;
&amp;gt; &amp;gt; 'end do somethin part&lt;BR /&gt;
&amp;gt; &amp;gt; 'set tmp to loop through again&lt;BR /&gt;
&amp;gt; &amp;gt; filenom = Dir$&lt;BR /&gt;
&amp;gt; &amp;gt; Loop&lt;BR /&gt;
&amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; '&lt;BR /&gt;
&amp;gt; &amp;gt; Private Sub SizeTxt()&lt;BR /&gt;
&amp;gt; &amp;gt; Dim elem As Object&lt;BR /&gt;
&amp;gt; &amp;gt; Dim found As Boolean&lt;BR /&gt;
&amp;gt; &amp;gt; ' this is from the Acad examples&lt;BR /&gt;
&amp;gt; &amp;gt; 'Cycle through the entities in the ModelSpace&lt;BR /&gt;
&amp;gt; &amp;gt; For Each elem In ThisDrawing.ModelSpace&lt;BR /&gt;
&amp;gt; &amp;gt; With elem&lt;BR /&gt;
&amp;gt; &amp;gt; If (.EntityName = "AcDbText") Or (.EntityName = "AcDbMText") Then&lt;BR /&gt;
&amp;gt; &amp;gt; ' Change the height of the text entity&lt;BR /&gt;
&amp;gt; &amp;gt; .Height = TextSize '0.5 'dim in declarations&lt;BR /&gt;
&amp;gt; &amp;gt; .Update&lt;BR /&gt;
&amp;gt; &amp;gt; found = True&lt;BR /&gt;
&amp;gt; &amp;gt; End If&lt;BR /&gt;
&amp;gt; &amp;gt; End With&lt;BR /&gt;
&amp;gt; &amp;gt; Set elem = Nothing&lt;BR /&gt;
&amp;gt; &amp;gt; Next elem&lt;BR /&gt;
&amp;gt; &amp;gt; ' If we didn't find text, notify user&lt;BR /&gt;
&amp;gt; &amp;gt; If Not found Then&lt;BR /&gt;
&amp;gt; &amp;gt; MsgBox "No text found in ModelSpace.", vbInformation&lt;BR /&gt;
&amp;gt; &amp;gt; End If&lt;BR /&gt;
&amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; 'done for now, jim kitts&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;&lt;/RUTHJIM&gt;&lt;/MWEAVER&gt;</description>
      <pubDate>Wed, 08 Mar 2000 15:06:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317219#M94863</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-03-08T15:06:11Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317220#M94864</link>
      <description>&amp;gt;"Jimmy B" &lt;CADMAN&gt; wrote in message&lt;BR /&gt;
news:8a5s78$7tl24@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt;My guess is that no update or regen is needed at all since the drawing is&lt;BR /&gt;
closed and saved.&lt;BR /&gt;
&lt;BR /&gt;
Good point.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;Anyway: "The Update method updates the display of a single object only. The&lt;BR /&gt;
Regen&lt;BR /&gt;
&amp;gt;method regenerates the entire drawing and recomputes the screen&lt;BR /&gt;
coordi-nates&lt;BR /&gt;
&amp;gt;and view resolution for all objects. It also reindexes the drawing&lt;BR /&gt;
&amp;gt;database for optimum display and object selection performance."&lt;BR /&gt;
&lt;BR /&gt;
Then what does application.update do?&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;--&lt;BR /&gt;
&amp;gt;Best regards: Jimmy B&lt;BR /&gt;
&amp;gt;CAD coordinator at Emtunga International AB&lt;BR /&gt;
&amp;gt;www.emtunga.com&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
==============================&lt;BR /&gt;
Michael Weaver&lt;BR /&gt;
Charles Bettisworth &amp;amp; Co.&lt;BR /&gt;
     mweaver@bettisworth.com&lt;BR /&gt;
==============================&lt;/CADMAN&gt;</description>
      <pubDate>Wed, 08 Mar 2000 16:54:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317220#M94864</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-03-08T16:54:05Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317221#M94865</link>
      <description>Gee thanks.  That is REAL fast.  Mike Weaver tried to put me onto this before.  I should&lt;BR /&gt;
have listened a little more.&lt;BR /&gt;
&lt;BR /&gt;
jim</description>
      <pubDate>Thu, 09 Mar 2000 03:31:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/batchfile-text-size-example/m-p/317221#M94865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-03-09T03:31:48Z</dc:date>
    </item>
  </channel>
</rss>

