Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to add a new layer in autocad with vb?

Status
Not open for further replies.

roust

Mechanical
Apr 10, 2002
6
I want to add a new layer in autocad, use code below,

set newlayer=AcadObj.ActiveDocument.Modelspace.layers.Add("Center")

but it cant be work. why? how to do it?
 
Replies continue below

Recommended for you

set Newlayer = activedrawing.layers.add("Center")
 
Thank you.
it should be:
set newlayer=AcadObj.ActiveDocument.layers.Add("Center")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor