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" wrote in
message news:402a4603$1_2@newsprd01...
> 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
>
>