This page contains EDMInterface API sample code to show how to exploit the powerful features of EDMqueryMethods. To run these samples, you need to create an EDMdatabase and compile the following schemas.
The Industry Foundation Classes (IFC) data model to describe building and construction industry data
Defines the EDMqueryMethods CheckModelCapacityUsed(), CheckEDMserverVersion() and GetMaxModelInstances(). Extends the IFC2x3 EXPRESS Schema
You will also need to import the following data set into the EDMmodel named IFC_WALL_01 in the DataRepository
Sample population with one instance of IFCWALLSTANDARDCASE, identified by a GUID
Sample population with three instances of IFCWALLSTANDARDCASE, with duplicate GUIDs
Sample population with one instance of IFCWALLSTANDARDCASE, with simple geometry.
Sample population with one instance of IFCWALLSTANDARDCASE, with pSet_WallCommon property set.
Sample 1: EDMqueryMethod with output in QueryResult table
This sample shows how to execute an EDMqueryMethod and pick up the result in a QueryResult table allocated in the calling clients heap memory. In the sample, input arguments to the Query are provided as SELECT type parameters. To run this sample, you need to have the EDMquerySchema IFC_Query_Samples_01 installed the EDMmodelServer. You also need to import the sample population IfcWall_01.ifc. Note that the QueryResult table shows instances of the VIEW_ENTITY type defined in the EDMqueryShema.
Sample 2: EDMqueryMethod with XML file I/O
This sample executes an EDMqueryMethod. Input arguments to the Query are provided through an XML file. The output is returned as a QueryTable written to the an XML file on the calling clients local file system.
To run this sample, you need to have the EDMquerySchema IFC_Query_Samples_01 installed the EDMmodelServer. You also need to import the sample population IfcWall_01.ifc.
Sample 3: EDMqueryMethods with XML String I/O
This sample executes an EDMqueryMethod. Input arguments to the Query are provided through an XML strings. The output is returned as a QueryTable written to the an XML string allocated in the calling clients heap memory. This sample also use file mapping to have the EDMqueryMethod write a result file directly in the calling clients local fils system.
To run this sample, you need to have the EDMquerySchema IFC_Query_Samples_01 installed the EDMmodelServer. You also need to import the sample population IfcWall_01.ifc.
Sample 4: EDMqueryMethods with Expression Logging
This sample executes an EDMqueryMethod. Input arguments to the Query are provided through XML strings. The output is returned as a QueryTable written to the an XML string allocated in the calling clients heap memory. This sample also use file mapping to have the EDMqueryMethod write a result file directly in the calling clients local file system.
To run this sample, you need to have the EDMquerySchema IFC_Query_Samples_01 installed the EDMmodelServer. You also need to import the sample population IfcWall_01.ifc.
Sample 5: EDMqueryMethods with SimpleType Output
This sample shows how to pick up a SimpleType return value from an EDMmethod. Typical SimpleType values are STRING, INTEGER, REAL, BOOLEAN, LOGICAL ...
To run this sample, you need to have the EDMquerySchema IFC_Query_Samples_01 installed the EDMmodelServer. You also need to import the sample population IfcWall_01.ifc.