change the layer from a block

change the layer from a block

Anonymous
Not applicable
253 Views
1 Reply
Message 1 of 2

change the layer from a block

Anonymous
Not applicable
Hello,
can I change with my program the layer from a block (objBlock) without a
separate
program with the AcadBlockReference?

Thanks
Hartmut Callies


Dim objBlock As AcadBlock
Dim objEntity As AcadEntity
Dim i as Integer

For i = 0 To ThisDrawing.Blocks.Count - 1
Set objBlock = ThisDrawing.Blocks(i)
'<===== objBlock.Item(objBlock.Name).Layer = "DIM" 'how can I
change the Layer from the block?
For Each objEntity In objBlock
'......
Next
Next i
0 Likes
254 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
I might be misunderstanding you, but a Block object does _not_ have a layer.
Objects within the block will have layers, and block insertions will have
layers, but not blocks themselves.

--
R. Robert Bell


"Hartmut Callies" wrote in message
news:5436614@discussion.autodesk.com...
Hello,
can I change with my program the layer from a block (objBlock) without a
separate
program with the AcadBlockReference?

Thanks
Hartmut Callies


Dim objBlock As AcadBlock
Dim objEntity As AcadEntity
Dim i as Integer

For i = 0 To ThisDrawing.Blocks.Count - 1
Set objBlock = ThisDrawing.Blocks(i)
'<===== objBlock.Item(objBlock.Name).Layer = "DIM" 'how can I
change the Layer from the block?
For Each objEntity In objBlock
'......
Next
Next i
0 Likes