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

Class to handle Sketch gbXML file data and processes. More...

Public Member Functions

bool LoadFile (string path)
 Loads a gbXML file from the supplied path into the GbXmlFile object and then parses the XML file, storing the contents in various intermediate internal object lists.
 
bool ImportModel ()
 Processes the intermediate object lists loaded using the LoadFile method and generates a DB model from the object lists.
 
bool ImportRawGeometry ()
 Imports the geometry directly as outline blocks (either from gbXML surfaces or spaces depending on the import mode).
 
bool WriteConstructionsToFile (string path)
 Writes constructions, layers, materials and window types to a specified ASCII file.
 
Image GetBitmap (ViewRotationType viewRotation)
 Returns a bitmap of the gbXML surface model with the supplied view rotation type (plan, left, right, etc.). The surface model is extracted from the intermediate surface list loaded using the LoadFile method. Refer to the ViewRotationType class for the view rotation enumerated type.
 
void Dispose ()
 

Properties

Collections.GbXmlConstructions Constructions [get]
 Returns a collection of gbXML constructions (see GbXmlConstruction class).
 
Collections.GbXmlLayers Layers [get]
 Returns a collection of gbXML materials (see GbXmlLayer class).
 
Collections.GbXmlMaterials Materials [get]
 Returns a collection of gbXML materials (see GbXmlMaterial class).
 
Collections.GbXmlWindowTypes WindowTypes [get]
 Returns a collection of gbXML window types (see GbXmlWindowType class).
 
Collections.GbXmlIntersectingSpaces IntersectingSpaces [get]
 Returns a collection of intersecting spaces (see GbXmlIntersectingSpace class). On importing a gbXML file, if intersections between imported spaces are encountered, a list of the associated space IDs is compiled which can be accessed via this class.
 
bool IsLoaded [get]
 Returns a boolean value indicating whether or not a gbXML file has been loaded.
 
bool ContainsSpacePolygonList [get]
 Returns a boolean value indicating whether or not the gbXML file contains space objects. A gbXML file can contain both surface and space objects but does not necessarily contain space objects.
 
GbXmlFileStats FileStatistics [get]
 Returns a GbXmlFileStats object. The GbXmlFileStats object can be used to obtain information from the gbXML import comprising the number of space objects imported directly (raw spaces), the number of spaces representing plan extrusions, the number of spaces representing non-plan extrusions and the number of spaces with malformed geometry.
 

Detailed Description

Class to handle Sketch gbXML file data and processes.

Member Function Documentation

◆ GetBitmap()

Image DB.Api.GbXmlFile.GetBitmap ( ViewRotationType  viewRotation)

Returns a bitmap of the gbXML surface model with the supplied view rotation type (plan, left, right, etc.). The surface model is extracted from the intermediate surface list loaded using the LoadFile method. Refer to the ViewRotationType class for the view rotation enumerated type.

Parameters
viewRotationEnumerated type for view rotation (refer to ViewRotationType class).
Returns
Bitmap image of gbXML surface model.

◆ ImportModel()

bool DB.Api.GbXmlFile.ImportModel ( )

Processes the intermediate object lists loaded using the LoadFile method and generates a DB model from the object lists.

Returns
TRUE if the model is successfully imported otherwise FALSE.

◆ ImportRawGeometry()

bool DB.Api.GbXmlFile.ImportRawGeometry ( )

Imports the geometry directly as outline blocks (either from gbXML surfaces or spaces depending on the import mode).

Returns
TRUE if successfully imported otherwise FALSE.

◆ LoadFile()

bool DB.Api.GbXmlFile.LoadFile ( string  path)

Loads a gbXML file from the supplied path into the GbXmlFile object and then parses the XML file, storing the contents in various intermediate internal object lists.

Parameters
pathFull path name of the gbXML file to be loaded.
Returns
TRUE if the gbXML file is successfully loaded otherwise FALSE.

◆ WriteConstructionsToFile()

bool DB.Api.GbXmlFile.WriteConstructionsToFile ( string  path)

Writes constructions, layers, materials and window types to a specified ASCII file.

Parameters
pathFull path name of ASCII file to which constructions will be written.
Returns
TRUE if constructions successfully written to file otherwise FALSE.

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