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.3
Syntax
public static bool CreateIFC4ExportFromSelected(
	string fullPathAndFileName,
	OperationIFCExportViewTypeEnum exportViewType,
	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.
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: Boolean
True, if Ifc4 export was successful, otherwise false. See session log for additional info in case failure.
Examples
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 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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next