Bentley Systems, Inc (CAD/CAM Software Production) | GenerativeComponents (GC) | Parametric Modeling Software
Fall - Winter 2014
Researched on:Database Facilities in GC
Enhancing the DataImporter and DataExporter Nodes in connection with databases like
SQL Server Express, Access and Text files
Visual Studio 2008, C#, GC script
Database Facilities in GenerativeComponents
GC includes facilities for accessing data stored in many types of databases; generally, any kind of database that's supported by ADO.NET.
GC provides two general techniques for accessing databases. The first technique uses the feature types, DataImporter and DataExporter. The second uses the GCScript classes, DataConnection and DataTable.
The DataImporter Feature
A DataImporter represents a table of data that has been loaded from an external database.
Subsequently, that data can be used to populate the child members of another feature (or set of features). For example, if a DataImporter contains a list of X, Y and Z coordinates, those values can be used to populate the child members of a Point feature.
A DataImporter has three update methods, which differ depending on how you want to connect to the external database, and how the table of data should be loaded from that database.
these methods are ‘ByDatabaseFile’, ‘ByTextFile’ and ‘ByDataBaseConnection’.
The DataExporter Feature
Like a DataImporter, a DataExporter connects to an external database.However, whereas a DataImporter is designed to populate another feature from the database, a DataExporter is designed to populate the database from another feature.
A DataExporter feature has three update methods, which differ depending on how you want to connect to the database, and how you want to provide the data to that database. And the update methods also are the same as DataImporter node.
Reference: GenerativeComponents Documentation