API Reference
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
DB.Api.Building Class Reference

Class to handle a DB model building object. A DB model building object is housed within the model Site object as one of a list of buildings. The building object is primarily composed of a set of building blocks (BuildingBlock objects) but also houses various other model components including component blocks, assembly instances, etc. More...

Public Member Functions

double GetHeight (bool includeUnoccupiedZones)
 Returns the maximum height of all occupied zones within the Building. Unoccupied zones can be included using the includeUnoccupiedZones argument.
 
double GetMeanLevelHeight (bool includeUnoccupiedZones)
 Deprecated.
 
Zone GetZoneFromHandle (int zoneHandle)
 Returns a Building zone as a Zone object using the associated zone handle.
 
Table GetTable (string tableName)
 Returns a Building table with the supplied name as a Table object.
 
Table AddTable (string tableName, int fieldCount)
 Adds an empty table with specified name and number of fields to the Building object.
 
void RemoveTable (string tableName)
 Removes an existing Building table with specified name.
 
void RemoveAllTables ()
 Removes all Building tables.
 
bool SetAttribute (string attributeName, string value)
 Sets an attribute with the supplied name to the supplied value.
 
string GetAttribute (string attributeName)
 Returns the string value of the attribute with the supplied name.
 
int GetAttributeAsInt (string attributeName)
 Returns the integer value of the attribute with the supplied name (same as GetIntegerAttribute). If the value of the attribute is not an integer value, the return value is undefined. To use this method, foreknowledge is required that the value of the attribute is in fact an integer value.
 
double GetAttributeAsDouble (string attributeName)
 Returns the double value of the attribute with the supplied name. If the value of the attribute is not a double value, the return value is undefined. To use this method, foreknowledge is required that the value of the attribute is in fact an double value.
 
int GetIntegerAttribute (string attributeName)
 Returns the integer value of the attribute with the supplied name (same as GetAttributeAsInt). If the value of the attribute is not an integer value, the return value is undefined. To use this method, foreknowledge is required that the value of the attribute is in fact an integer value.
 
DataObject GetAttributeDataObject (string attributeName)
 Returns a DataObject object associated with the attribute of the supplied name.
 
Zone GetZoneFromIdfName (string idfName)
 Returns a Building zone as a Zone object using the associated IDF name of the zone. IDF names are generated for EnergyPlus IDF file output (see Building CreateObjectIdfNames method).
 
bool IsAttributeTrue (string attributeName)
 Returns boolean value (TRUE/FALSE) of the attribute with the supplied name.
 
void CreateBookmark ()
 Creates a bookmark Building object. A bookmark is a copy of the current Building object.
 
void CreateFlatRoofs ()
 Deprecated.
 
void CreateNgPerimeterBlock (int zoneCount)
 Creates a building block with a specified number of zones comprising attribute data only and no associated geometry.
 
void CreateObjectIdfNames ()
 Creates an IDF name for all objects in the Building object. IDF names are unique names generated from the object name attribute (attribute named "Title") and complies with EnergyPlus label constraints.
 
void UpdateTileAttributes ()
 Regenerates all model graphical components that are affected by Building attribute data (default openings, textures, etc.)
 
void UpdateLumping ()
 Updates the linkages between zones that have been merged through merging processes such as merge by holes, selection, etc.
 
void UpdateGeometry ()
 Regenerates all zone inner surface gemoetries and default openings to account for changes in construction, etc.
 
void DeleteAllAssemblyInstances ()
 Deletes all assembly instances from the Building model.
 
void CheckValidOpeningFrameThicknesses ()
 Checks all openings to ensure that the frame thicknesses specified through attribute data will fit the geometry of the opening. If not, the frame attribute for the opening is switched off and a frame will not be cretaed for the opening when generating IDF data for EnergyPlus.
 
bool SelectBuildingBlock (int index)
 Selects a building block by index into the building block collection list.
 
bool SelectComponentBlock (int index)
 Selects a component block by index into the component block collection list.
 
bool SelectPlane (int index)
 Selects a plane by index into the plane collection list.
 
bool WriteHVACSystemToIDF (string filePath)
 Appends the current IDF file with detailed HVAC system IDF data.
 
bool ImportHvacSystem (string filePath)
 Imports an existing Sketch binary HVAC system file.
 
void AddAhuHvacComponent ()
 Adds a simple HVAC component. A simple HVAC component comprises attribute data only and no graphical representation.
 
void AddBoilerHvacComponent ()
 Adds a simple HVAC boiler component. A simple HVAC component comprises attribute data only and no graphical representation.
 
void AddChillerHvacComponent ()
 Adds a simple HVAC chiller component. A simple HVAC component comprises attribute data only and no graphical representation.
 
void RemoveAhuHvacComponent (int index)
 Removes a simple HVAC component. A simple HVAC component comprises attribute data only and no graphical representation.
 
void RemoveBoilerHvacComponent (int index)
 Removes a simple HVAC boiler component. A simple HVAC component comprises attribute data only and no graphical representation.
 
void RemoveChillerHvacComponent (int index)
 Removes a simple HVAC chiller component. A simple HVAC component comprises attribute data only and no graphical representation.
 
void ResetDefaultOpenings ()
 Removes all custom openings from all zone surfaces and resets default openings for surfaces.
 
bool IsZoneMoreExternalThanAdjacentZone (Zone zone, Zone adjacentZone)
 Determines whether or not a zone should be considered more of an external zone than the adjacent zone with which it is being compared for the purpose of EnergyPlus simulation. First, the "ZoneType" attribute is checked to see whether the zone is more or less external (e.g. 1-Standard is less external that 2-Semi exterior unconditioned). If the zone types are equivalent then the "HeatingOn" attribute is checked for both zones. If the zone is not heated but the adjacent one is then it is more external. If both zones are still equivalent then the "HeatingDesignSetpointTemperature" attributes are compared for both zones. If the zone has a lower heating setpoint than the adjacent zone then it is more external. If the 2 zones are still equivalent then a similar process is carried for cooling (the "ActiveCoolingOn" and "ActiveCoolingDesignSetpointTemperature" attributes are used for this) . The most external zone is the one with the lowest cooling setpoint. If after all these checks, the 2 zones are still equivalent then FALSE is returned.
 
void CreateThermalBridgingSurfaceEdgeList ()
 Used to calculate all zone surface edge thermal bridging lengths for all zones in the building. After calling this method, the bridging lengths may be retrieved using the Zone object ThermalBridgingLengths method which returns the bridging lengths in the form of a ZoneBridgingLengths object (refer to ZoneBridgingLengths class).
 
bool ImportComponentBlocksFromXMLFile (string filePath)
 Imports component blocks from DB XML file to current building. Note that the XML file must have the 'objects' element set to "building component blocks".
 
void Dispose ()
 

Properties

Collections.BuildingBlocks BuildingBlocks [get]
 Instantiates a collection of building blocks from the Sketch SketchDBuilding object.
 
Collections.ComponentBlocks ComponentBlocks [get]
 Instantiates a collection of component blocks from the Sketch SketchDBuilding object.
 
Collections.AssemblyInstances AssemblyInstances [get]
 Instantiates a collection of assembly instances from the Sketch SketchDBuilding object.
 
Collections.Planes Planes [get]
 Instantiates a collection of planes from the Sketch SketchDBuilding object.
 
Collections.Bookmarks Bookmarks [get]
 Instantiates a collection of bookmark building objects from the Sketch SketchDBuilding object.
 
Collections.Polygons PrimaryGeomoetryPolygons [get]
 Instantiate a collection of polygons extracted from the primary geometry elements of the model including internal and external surfaces, doors, window panes, window frames, etc.
 
Collections.SolarCollectors SolarCollectors [get]
 Instantiate a collection of solar collectors and photovoltaics from the Sketch SketchDBuilding object.
 
Collections.SimpleHvacComponents AhuHvacComponents [get]
 Instantiate a collection of simple HVAC components from the Sketch SketchDBuilding object.
 
Collections.SimpleHvacComponents BoilerHvacComponents [get]
 Instantiate a collection of simple HVAC boiler components from the Sketch SketchDBuilding object.
 
Collections.SimpleHvacComponents ChillerHvacComponents [get]
 Instantiate a collection of simple HVAC chiller components from the Sketch SketchDBuilding object.
 
Collections.HardAttributes HardAttributes [get]
 Instantiate a collection of 'hard' attributes from the Sketch SketchDBuilding object. Hard attributes are attributes set at a specific model decomposition level (building level in this case) and don't inherit from level above.
 
bool IsSelected [get]
 Determines whether or not the Building has been selected.
 
bool HasConstructionLines [get]
 Determines whether or not construction lines are present within the Building model.
 
bool HasOutlines [get]
 Determines whether or not outline blocks are present within the Building model.
 
HvacNetwork HvacNetwork [get]
 Determines whether or not the Building has an associated detailed HVAC model.
 

Detailed Description

Class to handle a DB model building object. A DB model building object is housed within the model Site object as one of a list of buildings. The building object is primarily composed of a set of building blocks (BuildingBlock objects) but also houses various other model components including component blocks, assembly instances, etc.

Member Function Documentation

◆ AddTable()

Table DB.Api.Building.AddTable ( string  tableName,
int  fieldCount 
)

Adds an empty table with specified name and number of fields to the Building object.

Parameters
tableNameName of table
fieldCountNumber of fields (columns) in table
Returns
TRUE if table added successfully otherwise FALSE

◆ CreateNgPerimeterBlock()

void DB.Api.Building.CreateNgPerimeterBlock ( int  zoneCount)

Creates a building block with a specified number of zones comprising attribute data only and no associated geometry.

Parameters
zoneCountNumber of zones to be added to the non-geometric building block

◆ GetAttribute()

string DB.Api.Building.GetAttribute ( string  attributeName)

Returns the string value of the attribute with the supplied name.

Parameters
attributeNameName of attribute from which value is to be retrieved
Returns
TRUE if attribute is retrieved successfully otherwise FALSE

◆ GetAttributeAsDouble()

double DB.Api.Building.GetAttributeAsDouble ( string  attributeName)

Returns the double value of the attribute with the supplied name. If the value of the attribute is not a double value, the return value is undefined. To use this method, foreknowledge is required that the value of the attribute is in fact an double value.

Parameters
attributeNameName of attribute from which double value is to be retrieved
Returns
Double value of attribute

◆ GetAttributeAsInt()

int DB.Api.Building.GetAttributeAsInt ( string  attributeName)

Returns the integer value of the attribute with the supplied name (same as GetIntegerAttribute). If the value of the attribute is not an integer value, the return value is undefined. To use this method, foreknowledge is required that the value of the attribute is in fact an integer value.

Parameters
attributeNameName of attribute from which integer value is to be retrieved
Returns
Integer value of attribute

◆ GetAttributeDataObject()

DataObject DB.Api.Building.GetAttributeDataObject ( string  attributeName)

Returns a DataObject object associated with the attribute of the supplied name.

Parameters
attributeNameName of attribute from which DataObject object is to be retrieved
Returns
DataObject object

◆ GetHeight()

double DB.Api.Building.GetHeight ( bool  includeUnoccupiedZones)

Returns the maximum height of all occupied zones within the Building. Unoccupied zones can be included using the includeUnoccupiedZones argument.

Parameters
includeUnoccupiedZonesDetermines whether or not to include unoccupied zones
Returns
Maximum height of zones within building

◆ GetIntegerAttribute()

int DB.Api.Building.GetIntegerAttribute ( string  attributeName)

Returns the integer value of the attribute with the supplied name (same as GetAttributeAsInt). If the value of the attribute is not an integer value, the return value is undefined. To use this method, foreknowledge is required that the value of the attribute is in fact an integer value.

Parameters
attributeNameName of attribute from which integer value is to be retrieved
Returns
Integer value of attribute

◆ GetMeanLevelHeight()

double DB.Api.Building.GetMeanLevelHeight ( bool  includeUnoccupiedZones)

Deprecated.

Parameters
includeUnoccupiedZones
Returns

◆ GetTable()

Table DB.Api.Building.GetTable ( string  tableName)

Returns a Building table with the supplied name as a Table object.

Parameters
tableNameName of table to be retrieved
Returns
Building table as Table object

◆ GetZoneFromHandle()

Zone DB.Api.Building.GetZoneFromHandle ( int  zoneHandle)

Returns a Building zone as a Zone object using the associated zone handle.

Parameters
zoneHandleHandle of the zone to be retrieved
Returns
Building zone as Zone object

◆ GetZoneFromIdfName()

Zone DB.Api.Building.GetZoneFromIdfName ( string  idfName)

Returns a Building zone as a Zone object using the associated IDF name of the zone. IDF names are generated for EnergyPlus IDF file output (see Building CreateObjectIdfNames method).

Parameters
idfNameIDF name of zone
Returns
Building zone as Zone object

◆ ImportComponentBlocksFromXMLFile()

bool DB.Api.Building.ImportComponentBlocksFromXMLFile ( string  filePath)

Imports component blocks from DB XML file to current building. Note that the XML file must have the 'objects' element set to "building component blocks".

Parameters
filePathFull path name of XML file from which component blocks are to be imported (must include .XML extension).
Returns
TRUE if the component blocks are successfully imported otherwise FALSE

◆ ImportHvacSystem()

bool DB.Api.Building.ImportHvacSystem ( string  filePath)

Imports an existing Sketch binary HVAC system file.

Parameters
filePathName of HVAC system file
Returns
TRUE if HVAC system is successfully imported otherwise FALSE

◆ IsAttributeTrue()

bool DB.Api.Building.IsAttributeTrue ( string  attributeName)

Returns boolean value (TRUE/FALSE) of the attribute with the supplied name.

Parameters
attributeNameAttribute name
Returns
TRUE if boolean value of attribute is true otherwise FALSE

◆ IsZoneMoreExternalThanAdjacentZone()

bool DB.Api.Building.IsZoneMoreExternalThanAdjacentZone ( Zone  zone,
Zone  adjacentZone 
)

Determines whether or not a zone should be considered more of an external zone than the adjacent zone with which it is being compared for the purpose of EnergyPlus simulation. First, the "ZoneType" attribute is checked to see whether the zone is more or less external (e.g. 1-Standard is less external that 2-Semi exterior unconditioned). If the zone types are equivalent then the "HeatingOn" attribute is checked for both zones. If the zone is not heated but the adjacent one is then it is more external. If both zones are still equivalent then the "HeatingDesignSetpointTemperature" attributes are compared for both zones. If the zone has a lower heating setpoint than the adjacent zone then it is more external. If the 2 zones are still equivalent then a similar process is carried for cooling (the "ActiveCoolingOn" and "ActiveCoolingDesignSetpointTemperature" attributes are used for this) . The most external zone is the one with the lowest cooling setpoint. If after all these checks, the 2 zones are still equivalent then FALSE is returned.

Parameters
zoneZone object which is to be compared for degree to which it is to be considered external
adjacentZoneAdjacent Zone object against which the comparison is made
Returns
TRUE if the supplied Zone object (zone) is deemed more of an external zone than the supplied adjacent Zone object (adjacentZone)

◆ RemoveAhuHvacComponent()

void DB.Api.Building.RemoveAhuHvacComponent ( int  index)

Removes a simple HVAC component. A simple HVAC component comprises attribute data only and no graphical representation.

Parameters
indexIndex of simple HVAC component to be removed

◆ RemoveBoilerHvacComponent()

void DB.Api.Building.RemoveBoilerHvacComponent ( int  index)

Removes a simple HVAC boiler component. A simple HVAC component comprises attribute data only and no graphical representation.

Parameters
indexIndex of simple HVAC boiler component to be removed

◆ RemoveChillerHvacComponent()

void DB.Api.Building.RemoveChillerHvacComponent ( int  index)

Removes a simple HVAC chiller component. A simple HVAC component comprises attribute data only and no graphical representation.

Parameters
indexIndex of simple HVAC chiller component to be removed

◆ RemoveTable()

void DB.Api.Building.RemoveTable ( string  tableName)

Removes an existing Building table with specified name.

Parameters
tableNameName of table to be removed

◆ SelectBuildingBlock()

bool DB.Api.Building.SelectBuildingBlock ( int  index)

Selects a building block by index into the building block collection list.

Parameters
indexIndex of building block to be selected
Returns
TRUE if a valid index is supplied otherwise FALSE

◆ SelectComponentBlock()

bool DB.Api.Building.SelectComponentBlock ( int  index)

Selects a component block by index into the component block collection list.

Parameters
indexIndex of component block to be selected
Returns
TRUE if a valid index is supplied otherwise FALSE

◆ SelectPlane()

bool DB.Api.Building.SelectPlane ( int  index)

Selects a plane by index into the plane collection list.

Parameters
indexIndex of plane to be selected
Returns
TRUE if a valid index is supplied otherwise FALSE

◆ SetAttribute()

bool DB.Api.Building.SetAttribute ( string  attributeName,
string  value 
)

Sets an attribute with the supplied name to the supplied value.

Parameters
attributeNameName of attribute to be set
valueValue to which attribute is to be set
Returns
TRUE if attribute is set successfully otherwise FALSE

◆ WriteHVACSystemToIDF()

bool DB.Api.Building.WriteHVACSystemToIDF ( string  filePath)

Appends the current IDF file with detailed HVAC system IDF data.

Parameters
filePathName of IDF file to be appended
Returns
TRUE if detailed HVAC IDF successfully written otherwise FALSE

The documentation for this class was generated from the following file: