muck Posted April 19, 2011 Share Posted April 19, 2011 Program, AutoCAD 2010 VBA I normally use the following code to get attributes from a drawing. Public Sub array1Initialize() For Each elem In ThisDrawing.ModelSpace If elem.EntityName = "AcDbBlockReference" Then If elem.Name = "SPREAD SHEET INFO" Then array1 = elem.GetAttributes DrawingAttributeCT = 0 For j = 0 To UBound(array1) 'Debug.Print array1(k) DrawingAttributeCT = DrawingAttributeCT + 1 Next j End If End If Next End Sub The attributes are in an array called array1. This works in my form module but when I move it to a class module I get array1 is not readable. Anyone have any ideal why this happens and is there any sample code that gets attribute in a class module? Thank you, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.