' 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
AutoCAD, AutoCAD Architecture (ACA/ADT), Revit Architecture, Revit MEP, Revit Structure, BIM, CAD, AutoLISP, VBA, VB, VB.NET, C#, databases, Access, SQL Server, FlexNet (FLEXlm), license usage reporting, software design, development, customization, integration...
Tuesday, January 17, 2006
Copy dimstyles between drawings using VBA
Subscribe to:
Post Comments (Atom)
Some of the latest blog posts
Contact Us
| About JTB World |
Website General Terms of Use |
Privacy Policy
^ Top of page
© 2004- JTB World. All rights reserved.
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