create and modify layers

create and modify layers

Anonymous
Not applicable
241 Views
2 Replies
Message 1 of 3

create and modify layers

Anonymous
Not applicable
Hi

I need some code to achieve the following:

-create layer 'Construction'
-modify color to red
-modify lineweight to 0.7mm
-modify printable to no

Thank you
Roman
0 Likes
242 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Here is some code (not complete no lineweight an no printable)


Sub Layers()

Dim ConstructionAs AcadLayer


Set Construction = ThisDrawing.Layers.Add("Construction")


Construction.color = acred


On Error Resume Next
Call ThisDrawing.Linetypes.Load("hidden", "acadiso.lin")

line.Linetype = "hidden" (or some thing else)

End Sub
0 Likes
Message 3 of 3

Anonymous
Not applicable
Hi,

The code to set Layer colour does not work in versions of AutoCAD with
TrueColor. The help files have sample code to set the layer TrueColor
value.

--

Laurie Comerford
CADApps
www.cadapps.com.au
wrote in message news:5106230@discussion.autodesk.com...
Here is some code (not complete no lineweight an no printable)


Sub Layers()

Dim ConstructionAs AcadLayer


Set Construction = ThisDrawing.Layers.Add("Construction")


Construction.color = acred


On Error Resume Next
Call ThisDrawing.Linetypes.Load("hidden", "acadiso.lin")

line.Linetype = "hidden" (or some thing else)

End Sub
0 Likes