muck Posted April 9, 2009 Share Posted April 9, 2009 AutoCAD 2000 up VBA. I am trying to access block in order to change a layer name within them. I have the coce: Public Sub ListBlocks() Dim objBlock As AcadBlock Dim strBlockList As String strBlockList = "List of blocks: " For Each objBlock In ThisDrawing.Blocks strBlockList = strBlockList & vbCr & objBlock.Name Next MsgBox strBlockList End Sub This code only gives the layer names. How do I change layer name/color within a block using VBA. Also, is model and paper space considered to be a block within the block collection? Thank you, Quote Link to comment Share on other sites More sharing options...
SEANT Posted April 10, 2009 Share Posted April 10, 2009 Based on the sample code, I’m not entirely clear on what the required task is. Are you trying to change the layer and colors of entities within the block? Or are you trying to change the layer in which the Block Insert resides? Also, is model and paper space considered to be a block withinthe block collection? Thank you, That is correct. 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.