본문 바로가기
AutoCAD/AutoLisp

LayerState에 관한 설명 - 캐드에서 레이어 셋팅을 관리가능

by Crony 2011. 11. 9.

layerstate-addlayers
Adds or updates a series of layers to a layer state
 
layerstate-delete
Deletes a layer state
(layerstate-delete "SM_LayerState")
 
layerstate-export
Exports a layer state to a specified file
(layerstate-export "SM_LayerState" Las_Name)
 
layerstate-getlayers
Returns the layers saved in a layer state
 
layerstate-has
Checks if a layer state is present
(layerstate-has "SM_LayerState")
 
layerstate-import
Imports a layer state from a specified file
(layerstate-import Las_Name)
 
layerstate-rename
Renames a layer state
 
layerstate-restore
Restores a layer state into the current drawing
(layerstate-restore "SM_LayerState" viewportId 21)
 
layerstate-save
Saves a layer state in the current drawing
1- Restore the saved On or Off value
2- Restore the saved Frozen or Thawed value
4- Restore the saved Lock value
8- Restore the saved Plot or No Plot value
16- Restore the saved VPVSDFLT value
32- Restore the saved Color
64- Restore the saved LineType
128- Restore the saved LineWeight
(layerstate-save "SM_LayerState" 111 viewportId)

;; LayerState Path 설정
(setq SM_Path (vl-filename-directory (findfile "SM_StartLisp.FAS")))
(setq Las_Name (strcat SM_Path "\\" "SMTempLayerState.las"))