How do I create a layer and give it color red ? thanks
If you're using 2004 or higher, you should use TrueColor instead. From the ACAD Help file... Remarks This property is obsolete and will be removed in a future version. Try this: Public Sub NewLayer() Dim lay As AcadLayer Dim color As AcadAcCmColor Set color = New AcadAcCmColor With color .ColorMethod = acColorMethodByACI .ColorIndex = "1" End With Set lay = ThisDrawing.Layers.Add("MyNewRedLayer") lay.TrueColor = color End Sub -- Matt W The difference between genius and stupidity is that genius has its limits. | thanks | "Jeff Mishler" <> skrev i en meddelelse | | > Dim oLay As AcadLayer | > set oLay = ThisDrawing.Layers.Add("MyNewRedLayer") | > oLay.Color = 1 | > | > -- | > Jeff | > check out www.cadvault.com | > > How do I create a layer and give it color red ? | > > | > > thanks | > > | > > | > | > | |