.. _level_object:

Level
=====

*Level* objects are used to divide the available *Footprint* so that the building can contain the desired number of functions or occupants. There can be one or more levels in the building and all are managed by the *Site* object. When Buildes starts and creates the default *Site* object, a corresponding default *Level* is also created. If the user replaces the default *Site* object, the new object continues using the default *Level* object. If the user requires only a single level building, it is not necessary to create additional levels.

If the user creates the first *Level* object, it replaces the default *Level*. All desired *Level* objects can be created at once. The benefit of this is to group them in one location in the text description so that the user can find them easily. However the user can create each level as needed. Regardless of how many levels in the design, Buildes hands over the management of each new object to the default or the first user-created *Level* object. To put new objects under the management of other *Level* objects, the user must select the desired *Level*.

Use the following syntax::

    # If user creates buildes components at this point, they will be managed
    #+ by "Default_Level".

    level("Level1", 3000)  # First level object called "level1" with height of
    		    	   #+ 3000 mm. Replaces "Default_Level" and resumes as
			   #+ the active level.

    # All buildes components managed by "Default_Level" will now be managed by
    #+ its replacement "Level1"

    level("Level2", 3000)  # Second level object.

    # If user creates buildes components at this point, they will still be
    #+ managed by "Level1".

    setLevel("Level2")     # Direct Buildes to select "level2" as active.

    # All objects created at this point will now be managed by "level2"

    level("Level3", 3000)  # Third level object created as needed.

    setLevel()             # Direct Buildes to select the most recently created
    			   #+ level object. In this case "level3".