Home Product Purchase Support Testimonials Contact

CADSTA Tools - (LayerState-AddLayers)

layerstate-addlayers

Adds or updates one or more layers to a layer state.

(layerstate-addlayers layerstatename (list layername state color linetype lineweight plotstyle) ...)

Arguments

layerstatename

Type: String

Name of the layer state.

layername

Type: String

Name of the layer to be added

state

Type: Integer or nil

Layerstate value for the layer

1

Turns off the layer

2

Freezes the layer

4

Locks the layer

8

Sets the layer as NOT plotable

16

Sets the layer as being frozen in the new viewports

nil

Sets the default to on, thawed, unlcked, plottable and thawed in the new viewports

color

Type: List

A dotted pair specifying the layer color type and value.

For example:

Index color

((62 . ColorIndex)

True color

(420 . True Color)

Color book

(430 . "colorbookname$colorname")

linetype

Type: String

Layer linetype name.

Note: The linetype must have already been loaded into the drawing. If it has not been yet, the linetype will be set to "Continuous".

lineweight

Type: Integer or nil

Lineweight for hte layer. If it is NIL, default lineweight will be used for the layer.

plotstyle

Type: String or nil

Plot style name for the layer.

Return Value

T or nil.

Examples

_$ (layerstate-addlayers

        "myLayerState"

        (list "Roofs" 4 '(62 . 50) "HIDDEN" 30 "10% Screen")

        (list "Floors" 6 '(420 . 16235134) "Continuous" 40 "50% Screen")

        (list "Hatching" 1 '(430 . "RAL CLASSIC$RAL 1004") "HIDDEN" nil nil)

)

T

Related References

layerstate-import

layerstate-removelayers

layerstate-compare

layerstate-export

layerstate-importfromdb

layerstate-save

layerstate-rename

layerstate-getlayers

layerstate-getnames

layerstate-has

layerstate-restore

layerstate-delete

layerstate-getlastrestored

Try or Buy

Product Information

CADSTA Tools

CADSTA Tools Features

Using AutoLISP with CADSTA Tools

Supported AutoLISP file format

Enter AutoLISP codes at command Line

Using AutoLISP with Menu

Using MNL file with CADSTA Tools

Appload Command

CADSTATools.lsp / acad.lsp

CADSTAToolsDoc.lsp / acaddoc.lsp

S::STARTUP Function

Startup Suite

LISP Functions: Operators

LISP Functions: A - C

LISP Functions: D - H
LISP Functions: I - P
LISP Functiosns: Q - U

LISP Functions: V

LISP Functions: W - Z

CADSTA Elements Features

Forum

Click here to go to our forum where you can exchange information, ask questions and share tips with others.

Search

Enter search words

Sign Up For Newsletter

Click here to sign up for our newsletter.

Follow Us