<?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: Dimstyle Object and ObjectDBX in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951526#M56941</link>
    <description>Hi...&lt;BR /&gt;
&lt;BR /&gt;
Why is there a point in .DimStyle in the code line?&lt;BR /&gt;
&lt;BR /&gt;
For Each oDimStyle In .DimStyles&lt;BR /&gt;
&lt;BR /&gt;
I don't see the sentence With&lt;BR /&gt;
&lt;BR /&gt;
:S</description>
    <pubDate>Wed, 11 Feb 2004 16:59:09 GMT</pubDate>
    <dc:creator>Speed_CAD</dc:creator>
    <dc:date>2004-02-11T16:59:09Z</dc:date>
    <item>
      <title>Dimstyle Object and ObjectDBX</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951524#M56939</link>
      <description>Why is the Dimstyle object so limited and doesn't operate at all like the
textstyle object?

Does anyone know: Using the high speed background processing of ObjectDBX
from vba, how do you get the dimstyles and their settings?

- Ted Schaefer, WD Partners</description>
      <pubDate>Wed, 11 Feb 2004 15:10:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951524#M56939</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-02-11T15:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dimstyle Object and ObjectDBX</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951525#M56940</link>
      <description>Some code:

'This works
Private Sub ProcessTextStyles(oDbxDwg As AxDbDocument)
Dim oTxtStyle As AcadTextStyle
For Each oTxtStyle In oDbxDwg.TextStyles
    With oTxtStyle
        oClsDB.AddTextStyle .Name, .fontFile, .Height, .Width, oDbxDwg.Name
    End With
Next
End Sub

'This does NOT work
Private Sub ProcessDimStyles(oDbxDwg As AxDbDocument)
Dim oDimStyle As AcadDimStyle
For Each oDimStyle In .DimStyles
    With oDimStyle
       oClsDB.AddDimStyle .Name, .Font, .Rarrow, .Larrow, .lunits, .luprec
    End With
    Next
End Sub


'This also does NOT work (I thought if I could copy into a blank drawing, I
could do something)
Private Sub ProcessDimStyles(oDbxDwg As AxDbDocument, Optional lngProtoID As
Long = 0)
Dim oDs As AcadDimStyle
Dim oDsName As String
Dim oDwg As AcadDocument
Dim oNewDS As AcadDimStyle

Set oDwg = ThisDrawing

On Error Resume Next
For Each oDs In oDbxDwg.DimStyles
   oDsName = oDs.Name
   Set oNewDS = oDwg.DimStyles.Add(oDsName)
   oNewDS.CopyFrom oDs
Next
End Sub


"xxxTed Schaefer" &lt;XXXXXREMOVETHISXXXXTED.SCHAEFER&gt; wrote in
message news:402a4603$1_2@newsprd01...
&amp;gt; Why is the Dimstyle object so limited and doesn't operate at all like the
&amp;gt; textstyle object?
&amp;gt;
&amp;gt; Does anyone know: Using the high speed background processing of ObjectDBX
&amp;gt; from vba, how do you get the dimstyles and their settings?
&amp;gt;
&amp;gt; - Ted Schaefer, WD Partners
&amp;gt;
&amp;gt;&lt;/XXXXXREMOVETHISXXXXTED.SCHAEFER&gt;</description>
      <pubDate>Wed, 11 Feb 2004 16:16:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951525#M56940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-02-11T16:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dimstyle Object and ObjectDBX</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951526#M56941</link>
      <description>Hi...&lt;BR /&gt;
&lt;BR /&gt;
Why is there a point in .DimStyle in the code line?&lt;BR /&gt;
&lt;BR /&gt;
For Each oDimStyle In .DimStyles&lt;BR /&gt;
&lt;BR /&gt;
I don't see the sentence With&lt;BR /&gt;
&lt;BR /&gt;
:S</description>
      <pubDate>Wed, 11 Feb 2004 16:59:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951526#M56941</guid>
      <dc:creator>Speed_CAD</dc:creator>
      <dc:date>2004-02-11T16:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dimstyle Object and ObjectDBX</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951527#M56942</link>
      <description>I know this is goofy, but what you have to do is use SetVariable to set
all of the dim** system variables the way you want them, and then use
the copyfrom method of the DimStyle object, specifying your
AxDbDocument object as the source object.


-- 
Chuck Gabriel

Since when is ignorance a point of view?
------------------------------------------------------------------------
Chuck Gabriel's Profile: http://www.vbdesign.net/expresso/member.php?action=getinfo&amp;amp;userid=16
View this thread: http://www.vbdesign.net/expresso/showthread.php?threadid=25806</description>
      <pubDate>Wed, 11 Feb 2004 18:14:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951527#M56942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-02-11T18:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dimstyle Object and ObjectDBX</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951528#M56943</link>
      <description>is this a typo?
&amp;gt; For Each oDimStyle In .DimStyles

should it be
&amp;gt; For Each oDimStyle In oDbxDwg.DimStyles
???

you might look into posts regarding the difference between axdblib objects
and acadlib objects
 Dim oTxtStyle As AXDB15Lib.AcadTextStyle
in lieu of
 Dim oTxtStyle As AcadTextStyle

though I have no idea if that's causing whatever problem you're encountering

from looking at your copyfrom example i would have thought that that would
have worked.
did you confirm the dbx doc was a valid object at the time of calling that
sub?

hth
Mark

"xxxTed Schaefer" &lt;XXXXXREMOVETHISXXXXTED.SCHAEFER&gt; wrote in
message news:402a5561$1_3@newsprd01...
&amp;gt; Some code:
&amp;gt;

&amp;gt; For Each oDimStyle In .DimStyles

&amp;gt; 'This also does NOT work (I thought if I could copy into a blank drawing,
I
&amp;gt; could do something)
&amp;gt; Private Sub ProcessDimStyles(oDbxDwg As AxDbDocument, Optional lngProtoID
As
&amp;gt; Long = 0)
&amp;gt; Dim oDs As AcadDimStyle
&amp;gt; Dim oDsName As String
&amp;gt; Dim oDwg As AcadDocument
&amp;gt; Dim oNewDS As AcadDimStyle
&amp;gt;
&amp;gt; Set oDwg = ThisDrawing
&amp;gt;
&amp;gt; On Error Resume Next
&amp;gt; For Each oDs In oDbxDwg.DimStyles
&amp;gt;    oDsName = oDs.Name
&amp;gt;    Set oNewDS = oDwg.DimStyles.Add(oDsName)
&amp;gt;    oNewDS.CopyFrom oDs
&amp;gt; Next
&amp;gt; End Sub
&amp;gt;
&amp;gt;
&amp;gt; "xxxTed Schaefer" &lt;XXXXXREMOVETHISXXXXTED.SCHAEFER&gt; wrote
in
&amp;gt; message news:402a4603$1_2@newsprd01...
&amp;gt; &amp;gt; Why is the Dimstyle object so limited and doesn't operate at all like
the
&amp;gt; &amp;gt; textstyle object?
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; Does anyone know: Using the high speed background processing of
ObjectDBX
&amp;gt; &amp;gt; from vba, how do you get the dimstyles and their settings?
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; - Ted Schaefer, WD Partners
&amp;gt; &amp;gt;
&amp;gt; &amp;gt;
&amp;gt;
&amp;gt;&lt;/XXXXXREMOVETHISXXXXTED.SCHAEFER&gt;&lt;/XXXXXREMOVETHISXXXXTED.SCHAEFER&gt;</description>
      <pubDate>Wed, 11 Feb 2004 18:46:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951528#M56943</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-02-11T18:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dimstyle Object and ObjectDBX</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951529#M56944</link>
      <description>Sorry,
I erased the With objDbxDoc .... End With
- Ted

"SpeedCAD" &lt;NOSPAM&gt; wrote in message
news:13920577.1076518784813.JavaMail.jive@jiveforum2.autodesk.com...
&amp;gt; Hi...
&amp;gt;
&amp;gt; Why is there a point in .DimStyle in the code line?
&amp;gt;
&amp;gt; For Each oDimStyle In .DimStyles
&amp;gt;
&amp;gt; I don't see the sentence With
&amp;gt;
&amp;gt; :S&lt;/NOSPAM&gt;</description>
      <pubDate>Wed, 11 Feb 2004 19:10:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951529#M56944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-02-11T19:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dimstyle Object and ObjectDBX</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951530#M56945</link>
      <description>There's no getvar / setvar in ObjectDBX.


"Chuck Gabriel" &lt;CHUCK.GABRIEL.11H52Z&gt; wrote in message
news:Chuck.Gabriel.11h52z@vbdesign.net...
&amp;gt;
&amp;gt; I know this is goofy, but what you have to do is use SetVariable to set
&amp;gt; all of the dim** system variables the way you want them, and then use
&amp;gt; the copyfrom method of the DimStyle object, specifying your
&amp;gt; AxDbDocument object as the source object.
&amp;gt;
&amp;gt;
&amp;gt; -- 
&amp;gt; Chuck Gabriel
&amp;gt;
&amp;gt; Since when is ignorance a point of view?
&amp;gt; ------------------------------------------------------------------------
&amp;gt; Chuck Gabriel's Profile:
http://www.vbdesign.net/expresso/member.php?action=getinfo&amp;amp;userid=16
&amp;gt; View this thread:
http://www.vbdesign.net/expresso/showthread.php?threadid=25806
&amp;gt;&lt;/CHUCK.GABRIEL.11H52Z&gt;</description>
      <pubDate>Wed, 11 Feb 2004 19:13:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951530#M56945</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-02-11T19:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dimstyle Object and ObjectDBX</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951531#M56946</link>
      <description>Oops.  That'll teach me to read more carefully (I hope).


-- 
Chuck Gabriel

Since when is ignorance a point of view?
------------------------------------------------------------------------
Chuck Gabriel's Profile: http://www.vbdesign.net/expresso/member.php?action=getinfo&amp;amp;userid=16
View this thread: http://www.vbdesign.net/expresso/showthread.php?threadid=25806</description>
      <pubDate>Wed, 11 Feb 2004 19:15:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951531#M56946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-02-11T19:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dimstyle Object and ObjectDBX</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951532#M56947</link>
      <description>From  Tom Nelson, Developer Technical Services.
Good reason for ADN. Tom's great!
This works - Ted

"I could not find any other reference to this particular issue, but I think
I have a workaround for you.  Using your code, I can copy the Dimstyles into
a new drawing, but if I attempt to select one from the Dimstyles dialog, a
fatal error results.  However, if I put the Dimstyles into an object array,
it appears that I can use the CopyObjects method.  The following example
assumes that I have a drawing "c:\test.dwg", which contains the desired
Dimstyles.  See below:"

&lt;CODE_BEGIN&gt;
Public Sub test()
   Dim oAxDoc As New AxDbDocument
   'Assume c:\test.dwg contains additional dimstyles
   oAxDoc.Open "c:\test.dwg"
   Dim objs() As Object
   Dim oDs As AcadDimStyle
   Dim i As Integer
   'Find the dimstyles in c:\test.dwg
   For i = 0 To oAxDoc.DimStyles.Count - 1
      ReDim Preserve objs(i)
      Set objs(i) = oAxDoc.DimStyles(i)
   Next
   'Copy the dimstyles across to the new database
   oAxDoc.CopyObjects objs, ThisDrawing.Database.DimStyles
End Sub
&lt;CODE_END&gt;


"xxxTed Schaefer" &lt;XXXXXREMOVETHISXXXXTED.SCHAEFER&gt; wrote in
message news:402a4603$1_2@newsprd01...
&amp;gt; Why is the Dimstyle object so limited and doesn't operate at all like the
&amp;gt; textstyle object?
&amp;gt;
&amp;gt; Does anyone know: Using the high speed background processing of ObjectDBX
&amp;gt; from vba, how do you get the dimstyles and their settings?
&amp;gt;
&amp;gt; - Ted Schaefer, WD Partners
&amp;gt;
&amp;gt;&lt;/XXXXXREMOVETHISXXXXTED.SCHAEFER&gt;&lt;/CODE_END&gt;&lt;/CODE_BEGIN&gt;</description>
      <pubDate>Thu, 12 Feb 2004 14:20:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951532#M56947</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-02-12T14:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dimstyle Object and ObjectDBX</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951533#M56948</link>
      <description>Thanks for sharing the solution!
:-)
Mark

"xxxTed Schaefer" &lt;XXXXXREMOVETHISXXXXTED.SCHAEFER&gt; wrote in
message news:402b8bc8$1_1@newsprd01...
&amp;gt; From  Tom Nelson, Developer Technical Services.
&amp;gt; Good reason for ADN. Tom's great!
&amp;gt; This works - Ted
&amp;gt;&lt;/XXXXXREMOVETHISXXXXTED.SCHAEFER&gt;</description>
      <pubDate>Thu, 12 Feb 2004 16:20:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimstyle-object-and-objectdbx/m-p/951533#M56948</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-02-12T16:20:56Z</dc:date>
    </item>
  </channel>
</rss>

