This is a very simple example showing how to create an openning within an existing object. This is done by creating a window and then linking it to the parent object.
Ecotect will understand that the child object is a window and the parent, in this case is a wall. Hence it will set the window as a hole within the parent. If you tried to link two walls together, or a wall and a ceiling, Ecotect would simply treat them as related in space (move one and the other moves with it).
Script Contents (Language: lua)
-- ==========================================
-- Example: Adding a child window to a wall.
-- ==========================================
cmd("model.new")
-- Create parent wall.
parent = add("object wall plane", true)
add("node", parent, 0, 10000, 2000, 0)
add("node", parent, 1, 15000, 2000, 0)
add("node", parent, 2, 15000, 2000, 3000)
add("node", parent, 3, 10000, 2000, 3000)
cmd("object.done")
-- Create child window.
child = add("object window plane", true)
add("node", child, 0, 11000, 2000, 600)
add("node", child, 1, 14000, 2000, 600)
add("node", child, 2, 14000, 2000, 2400)
add("node", child, 3, 11000, 2000, 2400)
cmd("object.done")
-- Link child to parent.
cmd("object.link", child, parent)
cmd("view.redraw")