layerstate-addlayers

AutoCad AutoLISP Functions

 
layerstate-addlayers
 
 
 

Adds or updates a series of layers to a layer state

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

Arguments

layerstatename

A string specifying the name of the layer state to be updated.

layername

A string specifying the name of the layer to be added or updated.

state

An integer sum designating properties in the layer to be set.

1- Turns the layer off

2- Freeze the layer

4- Lock the layer

8- Flag the layer as No Plot

16- Set the layer as being frozen in new viewports

A nil value uses defaults of on, thawed, unlocked, plottable, and thawed in new viewports.

color

A dotted pair specifying the layers color type and value, e.g. (62 . ColorIndex), (420 . TrueColor), or (430 . "colorbook$colorname").

linetype

A string specifying the name of the layer linetype. The linetype must already be loaded in the drawing or the default of "Continuous" will be used. A nil value sets the layer linetype to "Continuous."

lineweight

An integer corresponding to a valid lineweight, i.e., 35 = .35, 211 = 2.11. A nil value sets the layer lineweight to "Default."

plotstyle

A string specifying the name of the layers plot style. The plotstyle name must already be loaded in the drawing or the default of "Normal" will be used. A nil value sets the layer plotstyle to "Normal." If the drawing is in color dependent mode, this setting is ignored.

Return Values

T if successful; otherwise nil

Examples

(layerstate-addlayers “myLayerState” (list “Walls” 4 '(62 . 45) “Divide” 35 “10% Screen”)
(list “Floors” 6 '(420 . 16235019) “Continuous” 40 “60% Screen”)
(list “Ceiling” 0 '(430 . “RAL CLASSIC$RAL 1003”) “DOT” nil nil)))
T