![]() |
API Reference
|
Class to handle the site object. The site is the highest level object in the Sketch model object hierarchy. The model hierarchy runs from site down to zone surface openings which lie at the bottom of the hierarchy. Sites contain building objects. Building objects can contain component blocks, assembly instances and building blocks. Building blocks can contain component blocks, assembly instances and zones. Zones are comprised of surfaces and surfaces incorporate openings. By default, attribute data can be inherited from the site level down to zone surface opening level but may be overridden at any level in the hierarchy. This class incorporates methods to access objects within the hierarchy and to manipulate attribute data and data stored in tables. More...
Public Member Functions | |
| Building | CreateBuilding () |
| Used to create an empty building, initialise it with default attribute data and add it to the site. | |
| Table | AddTable (string tableName, int fieldCount) |
| Adds an empty table to the site with the supplied name and number of fields. | |
| Table | AddTableFromFile (string tableName, string filePath) |
| Adds an empty table to the site with the supplied name and then populates it with data from the .DAT file with the supplied name (refer to the Table class for further information concerning .DAT file format, etc.). | |
| Table | GetTable (string tableName) |
| Returns the site table with the supplied name. | |
| bool | RemoveTable (string tableName) |
| Removes the table with the supplied name from the site. | |
| void | RemoveAllTables () |
| Removes all site tables. | |
| bool | ClearTable (string tableName) |
| Removes all contents from the site table with the supplied name. | |
| Table | CopyTable (string srcTableName, string dstTableName) |
| Used to add an empty destination table to the site and then copy the contents of an existing source site table to the empty table. | |
| bool | CopyTableToComponents (string tableName) |
| Used to copy the supplied table to the DB components tables (see ApplicationComponents class). | |
| bool | CopyTableToTemplates (string tableName) |
| Used to copy the supplied table to the DB templates tables (see ApplicationTemplates class). | |
| void | AddAttribute (string attributeName, string value) |
| Adds an attribute with the supplied name and value. | |
| 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. | |
| bool | IsAttributeTrue (string attributeName) |
| Returns boolean value (TRUE/FALSE) of the attribute with the supplied name. | |
| void | RebuildModel () |
| Used to force a rebuild of the model geometry. A model rebuild forces all model zones to be rebuilt from primary geometry (building blocks, partitions, voids, etc.) and all zone adjacencies to be re-established. | |
| bool | SelectBuilding (int index) |
| Used to select the building with the supplied index. | |
| Building | GetBookmarkedBuilding (int index, int bookmark) |
| Returns the building with the supplied index if the supplied bookmark index is -1. If the bookmark index is a positive integer, the bookmark building with that index will be returned from the building with the supplied building index. | |
| void | CreateDisplayLists () |
| bool | ExportZonesToDxfFile (string filePath, int maxVertices, bool triangulate) |
| Exports the geometry of the model zones in the form of a collection of polygons to a DXF file. Polygons are generated for all zone surfaces of the model but excludes inner surfaces, window frames, window panes, etc. If the number of vertices in a polygon exceeds the supplied maximum limit, the polygon will be triangulated. Triangulation can be forced via the 'triangulate' parameter. | |
| bool | ExportSlabGeometryToDxfFile (string filePath) |
| Writes the geometry of the primary model objects in the form of a collection of polygons to a DXF file. Polygons are generated for all internal and external surfaces of the model and include external walls, internal partitions, window frames, window panes, etc. | |
| bool | ExportXMLFile (string filePath) |
| Exports the model in the form of an XML file. | |
| bool | ImportXMLFile (string filePath) |
| Imports the model from an XML file. | |
| void | Dispose () |
Properties | |
| Collections.Buildings | Buildings [get] |
| Returns a collection of buildings stored within the site (refer to Building class). | |
| Collections.DataObjects | AttributeDataObjects [get] |
| Returns a collection of data objects which can be used to manipulate attribute data (refer to DataObject class). | |
| Collections.Polygons | PrimaryGeometryPolygons [get] |
| Returns the geometry of the primary model objects in the form of a collection of polygons. Polygons are generated for all internal and external surfaces of the model and include external walls, internal partitions, window frames, window panes, etc. | |
| double | Azimuth [set] |
| Used to set the site azimuth. | |
| BoundingBox3d | Bounds [get] |
| Used to retrieve the geometric range of the site in the form of a 3D bounding box. | |
Class to handle the site object. The site is the highest level object in the Sketch model object hierarchy. The model hierarchy runs from site down to zone surface openings which lie at the bottom of the hierarchy. Sites contain building objects. Building objects can contain component blocks, assembly instances and building blocks. Building blocks can contain component blocks, assembly instances and zones. Zones are comprised of surfaces and surfaces incorporate openings. By default, attribute data can be inherited from the site level down to zone surface opening level but may be overridden at any level in the hierarchy. This class incorporates methods to access objects within the hierarchy and to manipulate attribute data and data stored in tables.
| void DB.Api.Site.AddAttribute | ( | string | attributeName, |
| string | value | ||
| ) |
Adds an attribute with the supplied name and value.
| attributeName | Name of attribute to be added. |
| value | Value of attribute to be added. |
| Table DB.Api.Site.AddTable | ( | string | tableName, |
| int | fieldCount | ||
| ) |
Adds an empty table to the site with the supplied name and number of fields.
| tableName | Name of table to be added. |
| fieldCount | Number of fields in table. |
| Table DB.Api.Site.AddTableFromFile | ( | string | tableName, |
| string | filePath | ||
| ) |
Adds an empty table to the site with the supplied name and then populates it with data from the .DAT file with the supplied name (refer to the Table class for further information concerning .DAT file format, etc.).
| tableName | Name of table to be added. |
| filePath | Full path name of .DAT file from which table will be populated. |
| bool DB.Api.Site.ClearTable | ( | string | tableName | ) |
Removes all contents from the site table with the supplied name.
| tableName | Name of table from which all contents is to be removed. |
| Table DB.Api.Site.CopyTable | ( | string | srcTableName, |
| string | dstTableName | ||
| ) |
Used to add an empty destination table to the site and then copy the contents of an existing source site table to the empty table.
| srcTableName | Name of existing table the contents of which is to be copied to the new destination table. |
| dstTableName | Name of new destination table to which the contents of the existing source table is to be copied. |
| bool DB.Api.Site.CopyTableToComponents | ( | string | tableName | ) |
Used to copy the supplied table to the DB components tables (see ApplicationComponents class).
| tableName | Name of table to be copied to components tables. |
| bool DB.Api.Site.CopyTableToTemplates | ( | string | tableName | ) |
Used to copy the supplied table to the DB templates tables (see ApplicationTemplates class).
| tableName | Name of table to be copied to templates tables. |
| Building DB.Api.Site.CreateBuilding | ( | ) |
Used to create an empty building, initialise it with default attribute data and add it to the site.
| bool DB.Api.Site.ExportSlabGeometryToDxfFile | ( | string | filePath | ) |
Writes the geometry of the primary model objects in the form of a collection of polygons to a DXF file. Polygons are generated for all internal and external surfaces of the model and include external walls, internal partitions, window frames, window panes, etc.
| filePath | Full path name of DXF file. |
| bool DB.Api.Site.ExportXMLFile | ( | string | filePath | ) |
Exports the model in the form of an XML file.
| filePath | Full path name of XML file. |
| bool DB.Api.Site.ExportZonesToDxfFile | ( | string | filePath, |
| int | maxVertices, | ||
| bool | triangulate | ||
| ) |
Exports the geometry of the model zones in the form of a collection of polygons to a DXF file. Polygons are generated for all zone surfaces of the model but excludes inner surfaces, window frames, window panes, etc. If the number of vertices in a polygon exceeds the supplied maximum limit, the polygon will be triangulated. Triangulation can be forced via the 'triangulate' parameter.
| filePath | Full path name of DXF file. |
| maxVertices | Maximum number of vertices allowed in exported polygon (otherwise triangulated). |
| triangulate | If set to TRUE, polygons will be triangulated. |
| string DB.Api.Site.GetAttribute | ( | string | attributeName | ) |
Returns the string value of the attribute with the supplied name.
| attributeName | Name of attribute from which value is to be retrieved |
| double DB.Api.Site.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.
| attributeName | Name of attribute from which double value is to be retrieved |
| int DB.Api.Site.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.
| attributeName | Name of attribute from which integer value is to be retrieved |
| Building DB.Api.Site.GetBookmarkedBuilding | ( | int | index, |
| int | bookmark | ||
| ) |
Returns the building with the supplied index if the supplied bookmark index is -1. If the bookmark index is a positive integer, the bookmark building with that index will be returned from the building with the supplied building index.
| index | Index of building or bookmark building to be returned. |
| bookmark | Index of bookmark building to be returned (-1 if the building itself is to be returned). |
| int DB.Api.Site.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.
| attributeName | Name of attribute from which integer value is to be retrieved |
| Table DB.Api.Site.GetTable | ( | string | tableName | ) |
Returns the site table with the supplied name.
| tableName | Name of table to be retrieved. |
| bool DB.Api.Site.ImportXMLFile | ( | string | filePath | ) |
Imports the model from an XML file.
| filePath | Full path name of XML file. |
| bool DB.Api.Site.IsAttributeTrue | ( | string | attributeName | ) |
Returns boolean value (TRUE/FALSE) of the attribute with the supplied name.
| attributeName | Attribute name |
| bool DB.Api.Site.RemoveTable | ( | string | tableName | ) |
Removes the table with the supplied name from the site.
| tableName | Name of table to be removed. |
| bool DB.Api.Site.SelectBuilding | ( | int | index | ) |
Used to select the building with the supplied index.
| index | Index of building to be selected |
| bool DB.Api.Site.SetAttribute | ( | string | attributeName, |
| string | value | ||
| ) |
Sets an attribute with the supplied name to the supplied value.
| attributeName | Name of attribute to be set |
| value | Value to which attribute is to be set |