Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page contains EDMInterface API sample code to show how to exploit the powerful features of EDMqueryMethodsEDMmapMethods. To run these samples, you need to create an EDMdatabase and compile the following schemas.

...

Section
Column
width30px

Insert excerpt
US:_icon_QEXXPX(30px)
US:_icon_QEXXPX(30px)
nopaneltrue

Column
width120px150px

Insert excerpt
US:_f_Ifc_Samples_01CheckPropertySet.qexxpx
US:_f_Ifc_Samples_01CheckPropertySet.qexxpx
nopaneltrue

Column

Defines the

EDMqueryMethods CheckModelCapacityUsed

EDMmapMethod CheckPropertySet()

, CheckEDMserverVersion() and GetMaxModelInstances(). Extends the IFC2x3 EXPRESS Schema

.

 

You will also need to import the following data set into the EDMmodel named IFC_WALL_0104 in the DataRepository DataRepositoy

Section
Column
width30px

Insert excerpt
US:_icon_STP(30px)
US:_icon_STP(30px)
nopaneltrue

Column
width120px
 
Insert excerpt
US:_f_IfcWall_02.ifc
nopaneltrue
Column

Sample population with three instances of IFCWALLSTANDARDCASE, with duplicate GUIDs

Section Column
width30px
Insert excerptUS:_icon_STP(30px)US:_icon_STP(30px)nopaneltrue Column
width120px
  Insert excerptUS:_f_IfcWall_03.ifcUS:_f_IfcWall_03.ifcnopaneltrue
Column

Sample population with one instance of IFCWALLSTANDARDCASE, with simple geometry.

Section
Column
width30px
Insert excerpt
US:_icon_STP(30px)US:_icon_STP(30px)
nopaneltrue
Column
width120px
 
Insert excerpt
US:_f_IfcWall_01.ifcUS:_f_IfcWall_01.ifc
nopaneltrue
Column

Sample population with one instance of IFCWALLSTANDARDCASE, identified by a GUID

Section Column
width30px
Insert excerptUS:_icon_STP(30px)US:_icon_STP(30px)nopaneltrue Column
width120px
  Insert excerptUS:_f_IfcWall_02.ifc
US:_f_IfcWall_04.ifc
US:_f_IfcWall_04.ifc
nopaneltrue
Column

Sample population with one instance of IFCWALLSTANDARDCASE, with a pSet_WallCommon property set.

 

...

Sample 1:

...

EDMmapMethod with result as User Defined Status

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 parametersexecutes an EDMmapMethod with no input parameters. It counts the number of property sets in the source model and returns the result as a user defined status. To run this sample, you need to have the EDMquerySchema IFC_Query_Samples_01 installed the EDMmodelServerthe EDMmapSchema CheckPropertySet. You also need to import the sample population IfcWall_0104.ifc. Note that the QueryResult table shows instances of the VIEW_ENTITY type defined in the EDMqueryShema.

Section
Column
width30px

Insert excerpt
US:_icon_C(30px)
US:_icon_C(30px)
nopaneltrue

Column
 
Insert excerpt
US:_xc_IfcEDMqueryMethod01IfcEDMmapMethod01
US:_xc_IfcEDMqueryMethod01IfcEDMmapMethod01
nopaneltrue

 

...

Sample 2:

...

 EDMmapMethod with Parameters and File Mapping 

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 EDMmapMethod with input parameters and file mapping between the logical file name 'result' and a file on the EDMthinClient local file system. To run this sample, you need to have the EDMquerySchema IFC_Query_Samples_01 installed the EDMmodelServerthe EDMmapSchema CheckPropertySet. You also need to import the sample population IfcWall_0104.ifc. 

Section
Column
width30px

Insert excerpt
US:_icon_C(30px)
US:_icon_C(30px)
nopaneltrue

Column
 
Insert excerpt
US:_xc_IfcEDMqueryMethod02IfcEDMmapMethod02
US:_xc_IfcEDMqueryMethod02IfcEDMmapMethod02
nopaneltrue

 

...

Sample 3:

...

 EDMmapMethods with Expression Logging 

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.EDMmapMethod with EDMvirtualMachine expression logging. To run this sample, you need to have the EDMquerySchema IFC_Query_Samples_01 installed the EDMmodelServerthe EDMmapSchema CheckPropertySet. You also need to import the sample population IfcWall_0104.ifc. 

Section
Column
width30px

Insert excerpt
US:_icon_C(30px)
US:_icon_C(30px)
nopaneltrue

Column
 
Insert excerpt
US:_xc_IfcEDMqueryMethod03IfcEDMmapMethod03
US:_xc_IfcEDMqueryMethod03IfcEDMmapMethod03
nopaneltrue