Search STEP Tools Web Support

Source and output

Project Files

(Right-click on projects to save)

Print Wall Properties

The PRINT WALL PROPERTIES sample program prints the properties associated with each wall instance in an IFC file. It iterates over all IfcWall instances in a file, then searches for the property set definitions related to each. Then it prints the properties in each property set. The C++ version of the program demonstrates how to use backpointers to efficiently find the relationship objects that refer to each wall. Use this as the starting point for a more sophisticated program.

The program takes the filename from the command line so you can use it with test files such as those on the buildingSMART site or Univ Karlsruhe.

Build Instructions

In the list above, select your Visual Studio version or platform, then right click on the link to save the zipped project files to your local disk. Unpack the zipfile.

On Windows, open the enclosed project file with Visual Studio and compile the program by selecting "Build All". The project creates a Console application that you can run from the command line. When using the 64bit version of ST-Developer, change the platform from "win32" to "X64" in the Visual Studio Configuration Manager before building.

On MacOS, Linux, and other Unix systems, the project directory contains a makefile that builds the sample program. The makefile uses the ROSE, ROSE_INCLUDE, and ROSE_LIB environment variables described in the ST-Developer installation notes. Compile the program by typing "make".

The Windows projects also include a makefile that you can use by typing "nmake", but you must run vcvars32.bat (found in the Visual Studio C++ bin directory) to make sure that the C++ compiler is in the command line search path.

Java Build Instructions

Right click on the link for the Java Version and save the project zipfile to your local disk. Unpack the zipfile.

You can build and run from the command line or with an IDE like Eclipse. In either case, you must add the jars for the base ST-Developer classes and the IFC schema classes to your classpath.

On the command line, you can find these jars through the ROSE environment variable as shown below:

# windows
> javac -cp "%ROSE%\lib\java\stdev.jar;%ROSE%\lib\java\ifc2x3lib.jar" PrintWallprops.java
> java  -cp "%ROSE%\lib\java\stdev.jar;%ROSE%\lib\java\ifc2x3lib.jar;." PrintWallProps [filename]

# unix
> javac -cp "$ROSE/lib/java/stdev.jar;$ROSE/lib/java/ifc2x3lib.jar" PrintWallprops.java
> java  -cp "$ROSE/lib/java/stdev.jar;$ROSE/lib/java/ifc2x3lib.jar;." PrintWallProps [filename]

When using Eclipse, we suggest setting a classpath variable called ROSE_JAVA that points to the ST-Developer jar directory, so you can refer to jars in a portable way.

In the properties dialog under Project | Properties, select Java Build Path and the Libraries tab. Then use Add Variable | Configure Variables | New to create a classpath variable called ROSE_JAVA that points to the ST-Developer jar folder. To reference each jar, select Add Variable, choose ROSE_JAVA and use Extend to pick the stdev.jar or ifc2x3.jar files.