<?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 AcadX-DocumentIterator in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299877#M68002</link>
    <description>Hi NG;&lt;BR /&gt;
&lt;BR /&gt;
I've been trying the great plugin from Tony T AcadX.&lt;BR /&gt;
The AcadXDynamicGraphics works perfect but I have&lt;BR /&gt;
problem with the DocumentIterator.&lt;BR /&gt;
What i want to accomplish is to change the font of a textstyle&lt;BR /&gt;
within a large number of drawings but it doesn't seem to&lt;BR /&gt;
save the changes.&lt;BR /&gt;
&lt;BR /&gt;
Thisdrawing.Save doesn't return an error so i don't know&lt;BR /&gt;
what it could be.&lt;BR /&gt;
&lt;BR /&gt;
Any ideas? See code below.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Private Sub Iterator_OpenDocument(Document As AXDB15Lib.IAxDbDocument)&lt;BR /&gt;
&lt;BR /&gt;
  Dim txtStyle As AcadTextStyle&lt;BR /&gt;
&lt;BR /&gt;
  ThisDrawing.Utility.Prompt vbCrLf &amp;amp; "Processing " &amp;amp; Document.Name&lt;BR /&gt;
&lt;BR /&gt;
  On Error GoTo Slutet&lt;BR /&gt;
  Set txtStyle = ThisDrawing.TextStyles.Item("Normal")&lt;BR /&gt;
  txtStyle.fontFile = "C:/AutoCAD/Fonts/iso.shx"&lt;BR /&gt;
&lt;BR /&gt;
  Err.Clear&lt;BR /&gt;
  ThisDrawing.Save&lt;BR /&gt;
&lt;BR /&gt;
MsgBox Err.Description&lt;BR /&gt;
&lt;BR /&gt;
Slutet:&lt;BR /&gt;
  Set txtStyle = Nothing&lt;BR /&gt;
&lt;BR /&gt;
End Sub</description>
    <pubDate>Thu, 28 Nov 2002 00:29:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-11-28T00:29:38Z</dc:date>
    <item>
      <title>AcadX-DocumentIterator</title>
      <link>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299877#M68002</link>
      <description>Hi NG;&lt;BR /&gt;
&lt;BR /&gt;
I've been trying the great plugin from Tony T AcadX.&lt;BR /&gt;
The AcadXDynamicGraphics works perfect but I have&lt;BR /&gt;
problem with the DocumentIterator.&lt;BR /&gt;
What i want to accomplish is to change the font of a textstyle&lt;BR /&gt;
within a large number of drawings but it doesn't seem to&lt;BR /&gt;
save the changes.&lt;BR /&gt;
&lt;BR /&gt;
Thisdrawing.Save doesn't return an error so i don't know&lt;BR /&gt;
what it could be.&lt;BR /&gt;
&lt;BR /&gt;
Any ideas? See code below.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Private Sub Iterator_OpenDocument(Document As AXDB15Lib.IAxDbDocument)&lt;BR /&gt;
&lt;BR /&gt;
  Dim txtStyle As AcadTextStyle&lt;BR /&gt;
&lt;BR /&gt;
  ThisDrawing.Utility.Prompt vbCrLf &amp;amp; "Processing " &amp;amp; Document.Name&lt;BR /&gt;
&lt;BR /&gt;
  On Error GoTo Slutet&lt;BR /&gt;
  Set txtStyle = ThisDrawing.TextStyles.Item("Normal")&lt;BR /&gt;
  txtStyle.fontFile = "C:/AutoCAD/Fonts/iso.shx"&lt;BR /&gt;
&lt;BR /&gt;
  Err.Clear&lt;BR /&gt;
  ThisDrawing.Save&lt;BR /&gt;
&lt;BR /&gt;
MsgBox Err.Description&lt;BR /&gt;
&lt;BR /&gt;
Slutet:&lt;BR /&gt;
  Set txtStyle = Nothing&lt;BR /&gt;
&lt;BR /&gt;
End Sub</description>
      <pubDate>Thu, 28 Nov 2002 00:29:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299877#M68002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-11-28T00:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: AcadX-DocumentIterator</title>
      <link>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299878#M68003</link>
      <description>Nevermind found the Document.SaveAs (Document.Name) method.&lt;BR /&gt;
But do you have any ideas why the change of the fontfile to the&lt;BR /&gt;
TextStyle isn't saved.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"David" &lt;DAVID.HELLBERG&gt; skrev i meddelandet&lt;BR /&gt;
news:38852EBFC96265FE4A6D06F0717547C8@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Hi NG;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I've been trying the great plugin from Tony T AcadX.&lt;BR /&gt;
&amp;gt; The AcadXDynamicGraphics works perfect but I have&lt;BR /&gt;
&amp;gt; problem with the DocumentIterator.&lt;BR /&gt;
&amp;gt; What i want to accomplish is to change the font of a textstyle&lt;BR /&gt;
&amp;gt; within a large number of drawings but it doesn't seem to&lt;BR /&gt;
&amp;gt; save the changes.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thisdrawing.Save doesn't return an error so i don't know&lt;BR /&gt;
&amp;gt; what it could be.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Any ideas? See code below.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Private Sub Iterator_OpenDocument(Document As AXDB15Lib.IAxDbDocument)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   Dim txtStyle As AcadTextStyle&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   ThisDrawing.Utility.Prompt vbCrLf &amp;amp; "Processing " &amp;amp; Document.Name&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   On Error GoTo Slutet&lt;BR /&gt;
&amp;gt;   Set txtStyle = ThisDrawing.TextStyles.Item("Normal")&lt;BR /&gt;
&amp;gt;   txtStyle.fontFile = "C:/AutoCAD/Fonts/iso.shx"&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   Err.Clear&lt;BR /&gt;
&amp;gt;   ThisDrawing.Save&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; MsgBox Err.Description&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Slutet:&lt;BR /&gt;
&amp;gt;   Set txtStyle = Nothing&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/DAVID.HELLBERG&gt;</description>
      <pubDate>Thu, 28 Nov 2002 01:03:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299878#M68003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-11-28T01:03:43Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299879#M68004</link>
      <description>David - After processing a drawing with the document&lt;BR /&gt;
iterator, open it in the drawing editor, and try grip&lt;BR /&gt;
editing some text whose style was changed, and let me&lt;BR /&gt;
know if the text updates to the new font.&lt;BR /&gt;
&lt;BR /&gt;
"David" &lt;DAVID.HELLBERG&gt; wrote in message news:2EF74139C4F43476604B555F101DB3EF@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Nevermind found the Document.SaveAs (Document.Name) method.&lt;BR /&gt;
&amp;gt; But do you have any ideas why the change of the fontfile to the&lt;BR /&gt;
&amp;gt; TextStyle isn't saved.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/DAVID.HELLBERG&gt;</description>
      <pubDate>Thu, 28 Nov 2002 01:36:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299879#M68004</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-11-28T01:36:07Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299880#M68005</link>
      <description>Hi Tony;&lt;BR /&gt;
&lt;BR /&gt;
I did work out when I replaced Thisdrawing.Textstyles with&lt;BR /&gt;
Document.Textstyles.&lt;BR /&gt;
See code below&lt;BR /&gt;
I think I saw you mention it in this NG somewhere that ThisDrawing might not&lt;BR /&gt;
work.&lt;BR /&gt;
But ThisDrawing.Utility.Prompt works fine so there is something strange.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for a great program/plugin for ACAD&lt;BR /&gt;
&lt;BR /&gt;
Private Sub Iterator_OpenDocument(Document As AXDB15Lib.IAxDbDocument)&lt;BR /&gt;
&lt;BR /&gt;
  Dim txtStyle As AcadTextStyle&lt;BR /&gt;
  ThisDrawing.Utility.Prompt vbCrLf &amp;amp; "Processing " &amp;amp; Document.Name&lt;BR /&gt;
&lt;BR /&gt;
  On Error GoTo Slutet&lt;BR /&gt;
  Set txtStyle = Document.TextStyles.Item("Normal")&lt;BR /&gt;
&lt;BR /&gt;
  txtStyle.fontFile = "C:/AutoCAD/Fonts/iso.shx"&lt;BR /&gt;
&lt;BR /&gt;
  Err.Clear&lt;BR /&gt;
  Document.SaveAs (Document.Name)&lt;BR /&gt;
&lt;BR /&gt;
Slutet:&lt;BR /&gt;
&lt;BR /&gt;
  Set txtStyle = Nothing&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO at="" caddzone="" dot="" com=""&gt; skrev i meddelandet&lt;BR /&gt;
news:021017CE1834376247A5A61E2432855F@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; David - After processing a drawing with the document&lt;BR /&gt;
&amp;gt; iterator, open it in the drawing editor, and try grip&lt;BR /&gt;
&amp;gt; editing some text whose style was changed, and let me&lt;BR /&gt;
&amp;gt; know if the text updates to the new font.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "David" &lt;DAVID.HELLBERG&gt; wrote in message&lt;BR /&gt;
news:2EF74139C4F43476604B555F101DB3EF@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; Nevermind found the Document.SaveAs (Document.Name) method.&lt;BR /&gt;
&amp;gt; &amp;gt; But do you have any ideas why the change of the fontfile to the&lt;BR /&gt;
&amp;gt; &amp;gt; TextStyle isn't saved.&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;/DAVID.HELLBERG&gt;&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Thu, 28 Nov 2002 02:25:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299880#M68005</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-11-28T02:25:13Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299881#M68006</link>
      <description>Sorry, I should have spotted that.&lt;BR /&gt;
&lt;BR /&gt;
In the OpenDocument event handler, the Document&lt;BR /&gt;
parameter is the AutoCAD drawing that is being&lt;BR /&gt;
processed, so that's what you must use.&lt;BR /&gt;
&lt;BR /&gt;
ThisDrawing is the AutoCAD drawing that's currently&lt;BR /&gt;
open and active in the drawing editor, which has&lt;BR /&gt;
nothing to do with the drawings that you are processing&lt;BR /&gt;
using the Document Iterator.&lt;BR /&gt;
&lt;BR /&gt;
ThisDrawing.Utility.Prompt is for displaying&lt;BR /&gt;
messages on the command line, and that will&lt;BR /&gt;
work, but for accessing the drawing that is&lt;BR /&gt;
currently being processed, you always use the&lt;BR /&gt;
Document parameter of the OpenDocument event&lt;BR /&gt;
handler.&lt;BR /&gt;
&lt;BR /&gt;
"David" &lt;DAVID.HELLBERG&gt; wrote in message news:444A88C3EAADAF4D794A2297E42222B7@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Hi Tony;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I did work out when I replaced Thisdrawing.Textstyles with&lt;BR /&gt;
&amp;gt; Document.Textstyles.&lt;BR /&gt;
&amp;gt; See code below&lt;BR /&gt;
&amp;gt; I think I saw you mention it in this NG somewhere that ThisDrawing might not&lt;BR /&gt;
&amp;gt; work.&lt;BR /&gt;
&amp;gt; But ThisDrawing.Utility.Prompt works fine so there is something strange.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks for a great program/plugin for ACAD&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Private Sub Iterator_OpenDocument(Document As AXDB15Lib.IAxDbDocument)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   Dim txtStyle As AcadTextStyle&lt;BR /&gt;
&amp;gt;   ThisDrawing.Utility.Prompt vbCrLf &amp;amp; "Processing " &amp;amp; Document.Name&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   On Error GoTo Slutet&lt;BR /&gt;
&amp;gt;   Set txtStyle = Document.TextStyles.Item("Normal")&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   txtStyle.fontFile = "C:/AutoCAD/Fonts/iso.shx"&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   Err.Clear&lt;BR /&gt;
&amp;gt;   Document.SaveAs (Document.Name)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Slutet:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;   Set txtStyle = Nothing&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Tony Tanzillo" &lt;TONY.TANZILLO at="" caddzone="" dot="" com=""&gt; skrev i meddelandet&lt;BR /&gt;
&amp;gt; news:021017CE1834376247A5A61E2432855F@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; David - After processing a drawing with the document&lt;BR /&gt;
&amp;gt; &amp;gt; iterator, open it in the drawing editor, and try grip&lt;BR /&gt;
&amp;gt; &amp;gt; editing some text whose style was changed, and let me&lt;BR /&gt;
&amp;gt; &amp;gt; know if the text updates to the new font.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; "David" &lt;DAVID.HELLBERG&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:2EF74139C4F43476604B555F101DB3EF@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Nevermind found the Document.SaveAs (Document.Name) method.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; But do you have any ideas why the change of the fontfile to the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; TextStyle isn't saved.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;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;/DAVID.HELLBERG&gt;&lt;/TONY.TANZILLO&gt;&lt;/DAVID.HELLBERG&gt;</description>
      <pubDate>Thu, 28 Nov 2002 02:50:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/acadx-documentiterator/m-p/299881#M68006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-11-28T02:50:34Z</dc:date>
    </item>
  </channel>
</rss>

