Bcc.GetLayerInformation
Bcc.GetLayerInformation()
Description
This function is utilized to get the current document layer information
Return
Returns a table containing the status of all of the layers. They key values are shown below:
- retTable.UseLayerAttributes - boolean on the status of the use layer attributes checkbox option
the return table indices 1 - n layers contains keys for finding specific layer information:
- retTable[i].Name – the layer name
- retTable[i].ID – internal layer ID number
- retTable[i].IsVisible – boolean defining whether the layer is visible or not
- retTable[i].IsActive – boolean defining whether the layer is active or not
- retTable[i].LayerColor – layer color in string format
- retTable[i].LayerLineStyle – the string name of the linestyle chosen for the layer
- Solid
- Dash
- Dot
- DashDot
- DashDotDot
Examples
retTable = Bcc.GetLayerInformation()
if(retTable ~= nil) then
local strInfo = "Total: ".. retTable.ArraySize.."\nUse Layer Attribute: "..(retTable.UseLayerAttribute and "true" or "false")
local i = 1
while (retTable[i] ~= nil) do
strInfo = strInfo.. "\nLayer Name: "..retTable[i].Name..
" ; ID: "..retTable[i].ID..
" ; Visibility: "..(retTable[i].IsVisible and "true" or "false")..
" ; IsActive: "..(retTable[i].IsActive and "true" or "false")..
" ; Layer Color: "..retTable[i].LayerColor..
" ; Layer Line Style: "..retTable[i].LayerLineStyle ;
i=i+1
end
dataInfo = { ControlType = "Label", Text = strInfo}
windowParas = { Title = "Layer Information", Width = 800}
Bcc.ShowDialogBox(windowParas, {dataInfo});
end