.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Show/hide layers

3 REPLIES 3
Reply
Message 1 of 4
funkyfresh
823 Views, 3 Replies

Show/hide layers

We have many different layers and we are trying to write a program to select the right layer to display by sending it as a string. The following code we know works

 

g_AcadDoc.Layers(layerNumber).Freeze = Not viewable

 

layerNumber is an integer but we are trying to retrieve the layerNumber by looking for the passed layerName.

 

Thank you

3 REPLIES 3
Message 2 of 4
caddzone
in reply to: funkyfresh

You can pass either a number (the index of the layer in the collection)

or a string (the name of the layer).

 

 



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Message 3 of 4
kyle.sipila
in reply to: funkyfresh

What is the object g_AcadDoc that holds the layers object? I am trying to hide layers myself and am not having much luck.

 

Thank you.

Message 4 of 4
caddzone
in reply to: kyle.sipila

It's the AcadDocument class.



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost