API Reference

Detailed and full API reference helps you master Tekla development

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

OperationCreateIFC4ExportFromSelected Method

Creates IFC4 export from the selected parts using the given file name.

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

Namespace:  Tekla.Structures.Model.Operations
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.1
public static bool CreateIFC4ExportFromSelected(
	string fullPathAndFileName,
	OperationIFCExportViewTypeEnum exportViewType,
	IEnumerable<string> propertySets,
	OperationExportBasePoint locationByValue,
	string exportLayersAsValue,
	string objectColoring,
	OperationIFCExportFlags flags,
	string basePointGuid


Type: SystemString
The full path and file name including extension (.ifc or .ifcZip).
Type: Tekla.Structures.Model.OperationsOperationIFCExportViewTypeEnum
The export view type.
Type: System.Collections.GenericIEnumerableString
The full path and file name of the property set files (.xml) to use in export.
Type: Tekla.Structures.Model.OperationsOperationExportBasePoint
The location by value.
Type: SystemString
The export layers as value: __Name__, __Phase__ or UDA value.
Type: SystemString
The object coloring value: Use "ByObjectClass" for color by object class. For additional coloring, use the name of the object representation.
Type: Tekla.Structures.Model.OperationsOperationIFCExportFlags
The additional flags.
Type: SystemString
Base point guid, if a base point used.

Return Value

Type: Boolean
True, if Ifc4 export was successful, otherwise false. See session log for additional info in case failure.
using Tekla.Structures.Model;
using Tekla.Structures.Model.Operations;

public class Example
       public void Example1()
           Picker Picker = new Picker();
           Beam Beam1 = Picker.PickObject(Picker.PickObjectEnum.PICK_ONE_PART, "Pick object to Create an Ifc4 for") as Beam;
           ArrayList Parts = new ArrayList();

           Tekla.Structures.Model.UI.ModelObjectSelector MOS = new Tekla.Structures.Model.UI.ModelObjectSelector();


           var fullPathAndFileName = @"C:\Export\MyIfc.ifc";
           var exportViewType = Operations.Operation.IFCExportViewTypeEnum.REFERENCE_VIEW;
           var propertySets = new List<string> { @"..\\default\\General\\Shared\\IFC\\AdditionalPSets\\CIP Construction data.xml" };
           var locationByValue = Operations.Operation.ExportBasePoint.GLOBAL;
           var exportLayersAsValue =  "__Name__";
           var objectColoring = "standard";
           var flags = new Operations.Operation.IFCExportFlags { IsLocationFromOrganizer = true, IsPoursEnabled = true };
           var basePointGuid = string.Empty;

           if (Operation.CreateIFC4ExportFromSelected(fullPathAndFileName, exportViewType, propertySets, locationByValue, exportLayersAsValue, objectColoring, flags, basePointGuid))
                MessageBox.Show("Ifc4 export creation successful");

           MOS.Select(new ArrayList()); // Remove UI selection
See Also