OperationCreateIFC4ExportFromSelectedAndTheirAssemblies Method |
Creates IFC4 export from the selected parts and their assemblies 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: 2026.0.0-alpha00057080+93cd22c410a086ecc356b7088d4daaf2e12907eb
public static bool CreateIFC4ExportFromSelectedAndTheirAssemblies( string fullPathAndFileName, OperationIFCExportViewTypeEnum exportViewType, OperationIFCExportVersionEnum exportVersion, IEnumerable<string> attributesOverridesFileNames, IEnumerable<string> propertySets, OperationExportBasePoint locationByValue, string exportLayersAsValue, string objectColoring, OperationIFCExportFlags flags, string basePointGuid )
Parameters
- fullPathAndFileName
- Type: SystemString
The full path and file name including extension (.ifc or .ifcZip). - exportViewType
- Type: Tekla.Structures.Model.OperationsOperationIFCExportViewTypeEnum
The export view type. - exportVersion
- Type: Tekla.Structures.Model.OperationsOperationIFCExportVersionEnum
The IFC export version. - 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. - propertySets
- Type: System.Collections.GenericIEnumerableString
The full path and file name of the property set files (.xml) to use in export. - locationByValue
- Type: Tekla.Structures.Model.OperationsOperationExportBasePoint
The location by value. - exportLayersAsValue
- Type: SystemString
The export layers as value: __Name__, __Phase__ or UDA value. - objectColoring
- Type: SystemString
The object coloring value: Use "ByObjectClass" for color by object class. For additional coloring, use the name of the object representation. - flags
- Type: Tekla.Structures.Model.OperationsOperationIFCExportFlags
The additional flags. - basePointGuid
- Type: SystemString
Base point guid, if a base point used.
Return Value
Type: BooleanTrue, 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(); Parts.Add(Beam1); Tekla.Structures.Model.UI.ModelObjectSelector MOS = new Tekla.Structures.Model.UI.ModelObjectSelector(); MOS.Select(Parts); var fullPathAndFileName = @"C:\Export\MyIfc.ifc"; var exportViewType = Operations.Operation.IFCExportViewTypeEnum.REFERENCE_VIEW; var exportVersion = Operations.Operation.IFCExportVersionEnum.IFC4; var attributesOverridesFileNames = new new List<string> { @"..\\default\\General\\Shared\\IFC\\IfcAttributeOverrides\\MyOverrides_overrideSetData.attributeoverride", @"..\\default\\General\\Shared\\IFC\\IfcAttributeOverrides\\MyOverrides_overrideData.attributeoverride" }; 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, attributesOverridesFileNames, propertySets, locationByValue, exportLayersAsValue, objectColoring, flags, basePointGuid)) { MessageBox.Show("Ifc4 export creation successful"); } MOS.Select(new ArrayList()); // Remove UI selection } }