GetPointAttributes.scr
This script illustrates how you can access object attribute data for only a specific type of object in the model.
Script Contents (Lang: lua)
-- ------------------------------------
-- GET POINT ATTRIBUTES:
-- Prints out all three attributes for
-- each POINT object in the current
-- model as a simple table.
-- ------------------------------------
objIndex = -1
repeat
-- Search for next POINT object.
objIndex = get("model.nextobject",
objIndex, "point", -1, -1, -1
)
-- Print data if valid.
if objIndex >= 0 then
printf("Pt:\t%d\t%f\t%f\t%f", objIndex,
get("object.attr1", objIndex)
get("object.attr2", objIndex)
get("object.attr3", objIndex)
)
end
until (objIndex < 0)

