Bcc.GetUCSInformation
Bcc.GetUCSInformation()
Description
This function is utilized to get the current document UCS information
Return
Returns a table containing the status of all of the layers. They key values are shown below:
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].IsActive – boolean defining whether the layer is active or not
- retTable[i].Matrix – the 4x4 matrix representing the coordinate system position and orientation from the WCS
Examples
retTable = Bcc.GetUCSInformation()
-- Display all the possible information to extract from the UCS list
if(retTable ~= nil) then
-- Get the total number of UCS's
local strInfo = "Total: "..retTable.ArraySize
-- List the information for each UCS
local i = 1
while (retTable[i] ~= nil) do
strInfo = strInfo.."\nUCS Name: "..retTable[i].Name.." ; ID: ".. retTable[i].ID.. " ; IsActive: "..(retTable[i].IsActive and "true" or "false")
-- View the 4x4 matrix for the UCS
itemMatix = retTable[i].Matrix
if(itemMatix ~= nil) then
strMatrix = " ; Matrix: {"
for col = 1, 4 do
strMatrix = strMatrix.." {"..itemMatix[col][1].. ", "..itemMatix[col][2]..", "..itemMatix[col][3]..", "..itemMatix[col][4].."} "
end
strInfo = strInfo .. strMatrix .. "}"
end
i = i + 1
end
-- Display the message box to show the data
Bcc.ShowMessageBox(strInfo, {ButtonType = "OK" , ImageType = "Information", Title = "Entity Information" })
end