getBlockAttributes

entity:getBlockAttributes()

Se l'entità e' un blocco, ritorna gli attributi come tabella. Il nome attributo e' la chiave, l'attributo e' il valore.

Esempio 1. Esempio getBlockAttributes

local ss = selset.filter{ {0, "INSERT"} }
if ss and ss:count() > 0 then
  local ins = ss:item(0)
  local attrs = ins:getBlockAttributes()
  if attrs then
    print("\ngetBlockAttributes: OK, count=" .. tostring(getn(attrs)))
  else
    print("\ngetBlockAttributes: nil (nessun attributo)")
  end
else
  print("\ngetBlockAttributes: nessun INSERT nel disegno")
end
if ss then ss:free() end