Jump to content

Recommended Posts

Posted

I wrote a program that extract block attributes from the current drawing. And it worked fine. After upgrading the computer my code stopped working.

In debugging mode I found the following problem:

(partial code)

 

Dim oEnt As AcadEntity

For Each oEnt In ThisDrawing.ModelSpace (problem line)

If TypeOf oEnt Is AcadBlockReference Then

Set blkTitle = oEnt

If blkTitle.Name = "Tag" And blkTitle.HasAttributes Then

aryAttributes = blkTitle.GetAttributes

shtObj.Cells(i + 1, 1) = aryAttributes(0).TextString

i = i + 1

End If

End If

Next

 

I'm getting

ThisDrawing.ModelSpace =

and on the next step

ThisDrawing.ModelSpace =

oEnt =

 

Please advise me how to fix it.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...