News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Querying layer number

Started by Frederick, February 05, 2007, 09:54:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frederick

Hi, I'm having trouble getting the layer number programmatically. There's a LAYER system function but I can't get it work, it always returns 1.00. Do I have to declare a specific data type or am I using the wrong function or doing something otherwise assinine?

Thanks, Rick

prl

To get the current layer number, do this:

.
.
.
curlay = sys(3)
.
.
.

DrollTroll

#2
Frederick, the Layer FUNCTION simply returns the status of the current layer -- i.e. does it have entities, it is locked, is it visible, and is it current?

The Layer STATEMENT allows you to change the status of the current layer -- locked, visible, current.

As was stated earlier, you may use Sys(3) to read or change the current layer. Be advised that making a locked or hidden layer current (by whatever means) automatically makes that layer visible and editable.

25 years with DesignCAD