OperationCreateIFC2x3Export Method

Creates IFC2x3 export using the given file name.

See Tekla Structures Help for more information about IFC2x3 export files.

Namespace:  Tekla.Structures.Model.Operations
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2026.0.0-alpha00057080+93cd22c410a086ecc356b7088d4daaf2e12907eb
Syntax
public static bool CreateIFC2x3Export(
	string fullPathAndFileName,
	OperationIFC2x3ExportViewTypeEnum exportViewType,
	IEnumerable<string> attributesOverridesFileNames,
	string additionalPropertySetFileName,
	OperationExportBasePoint locationByValue,
	bool layersNamesAsPartNames,
	bool useViewColors,
	OperationIFC2x3ExportFlags flags,
	string basePointGuid
)

Parameters

fullPathAndFileName
Type: SystemString
The full path and file name including extension (.ifc, .ifczip or .ifcxml).
exportViewType
Type: Tekla.Structures.Model.OperationsOperationIFC2x3ExportViewTypeEnum
The export view type.
attributesOverridesFileNames
Type: System.Collections.GenericIEnumerableString
The collection of full paths and file names of the attributes overrides files (*_overrideSetData.attributeoverride and *_overrideData.attributeoverride) to use in export. Empty for none.
additionalPropertySetFileName
Type: SystemString
The full path and file name of the property set file (.xml) to use in export. Empty for none.
locationByValue
Type: Tekla.Structures.Model.OperationsOperationExportBasePoint
The location by value.
layersNamesAsPartNames
Type: SystemBoolean
True for layers names as part names. False for default.
useViewColors
Type: SystemBoolean
True for using view colors in export. False for default.
flags
Type: Tekla.Structures.Model.OperationsOperationIFC2x3ExportFlags
The additional flags.
basePointGuid
Type: SystemString
Base point guid, if a base point used.

Return Value

Type: Boolean
True, if IFC2x3 export was successful, otherwise false. See log for additional info in case of failure.
Examples
using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms;

/// Demonstrates exporting a selected beam to an IFC2x3 file.

public class Example
{
    /// Exports a selected beam to an IFC2x3 file.

    public void Example1()
    {
        var picker = new Tekla.Structures.Model.UI.Picker();
        var beam = picker.PickObject(
            Tekla.Structures.Model.UI.Picker.PickObjectEnum.PICK_ONE_PART,
            "Pick object to create an IFC2x3 for") as Tekla.Structures.Model.Beam;

        if (beam == null)
        {
            MessageBox.Show("No beam was selected.");
            return;
        }

        var modelObjectSelector = new Tekla.Structures.Model.UI.ModelObjectSelector();
        var parts = new ArrayList { beam };

        try
        {
            modelObjectSelector.Select(parts);

            var exportSucceeded = Tekla.Structures.Model.Operations.Operation.CreateIFC2x3Export(
                fullPathAndFileName: @"C:\Export\MyIfc.ifc",
                exportViewType: Tekla.Structures.Model.Operations.Operation.IFC2x3ExportViewTypeEnum.COORDINATION_VIEW_20,
                attributesOverridesFileNames: new List
                {
                    @"..\default\General\Shared\IFC\IfcAttributeOverrides\MyOverrides_overrideSetData.attributeoverride",
                    @"..\default\General\Shared\IFC\IfcAttributeOverrides\MyOverrides_overrideData.attributeoverride"
                },
                additionalPropertySetFileName: @"..\default\General\Shared\IFC\AdditionalPSets\CIP Construction data.xml",
                locationByValue: Tekla.Structures.Model.Operations.Operation.ExportBasePoint.GLOBAL,
                layersNamesAsPartNames: false,
                useViewColors: false,
                flags: new Tekla.Structures.Model.Operations.Operation.IFC2x3ExportFlags
                {
                    ExportLocationsFromOrganizer = true,
                    IsPoursEnabled = true,
                    ExportAllObjects = false
                },
                basePointGuid: string.Empty);

            MessageBox.Show(
                exportSucceeded
                    ? "IFC2x3 export creation successful"
                    : "IFC2x3 export creation failed");
        }
        finally
        {
            modelObjectSelector.Select(new ArrayList()); // Remove UI selection
        }
    }
}
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next