I hate drawings that were not organized on layers.
and so i wish to write a program to monitor newly added objects.
i thought it would be as simple as this;
Code:
Private Sub AcadDocument_ObjectAdded(ByVal Object As Object)
If TypeName(Object) = "IAcadDimRotated" Then Object.Layer = "Dim"
End Sub
This is supposed to be monitoring Rotated Dimension Objects and put them in the "Dim" layer, but it has this error when a rotated dimension is added.
Run-time error '-2145386418 (80200004e)';
Object was open for read.
Does anybody know how to fix this?