Jump to content

Stepping thru objects in both model & paper space w/ VBA


muck

Recommended Posts

AutoCAD 2009 VBA

 

The following code is only for model space. What if I want to step thru

both model and paper space. Is there a statement for that?

 

Dim aObj As AcadEntity

For Each aObj In ThisDrawing.ModelSpace

'Code

Next aObj

 

Thank you,

Link to comment
Share on other sites

Something along this line should work.

 

 

   'include ModelSpace layout and all layouts in PaperSpace
  For Each objLayout In ThisDrawing.Layouts
     For Each Entity In objLayout.Block
        . . . . . .
     Next
  Next

Link to comment
Share on other sites

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...