' Add reference to AutoCAD/ObjectDBX Common 16.0 Type Library (axdb16enu.dll) ' This samples copies all dimstyles from specified drawing to the current drawing ' Existing dimstyles are not affected Public Sub ImportDimstyles() Dim oAxDbDoc As New AxDbDocument oAxDbDoc.Open "c:\DimStyles.dwg" Dim oObj() As Object Dim oDs As AcadDimStyle Dim i As Integer For i = 0 To oAxDbDoc.DimStyles.Count - 1 ReDim Preserve oObj(i) Set oObj(i) = oAxDbDoc.DimStyles(i) Next oAxDbDoc.CopyObjects oObj, ThisDrawing.Database.DimStyles End Sub
Settling into the holiday spirit
1 day ago
Restored comments
ReplyDeleteAnonymous said...
Could not get this to work in ADT 2006.
Some type of error in the Public Sub statement.
May 30, 2006
JTB World said...
Did you add reference to AutoCAD/ObjectDBX Common 16.0 Type Library?
May 30, 2006