SaveAsFabricationJob Method


Save fabrication parts to an MEP job that can be opened in the fabrication software.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2019

Syntax

C#
public static ISet<ElementId> SaveAsFabricationJob(
	Document document,
	ISet<ElementId> ids,
	string filename,
	FabricationSaveJobOptions saveOptions
)
Visual Basic
Public Shared Function SaveAsFabricationJob ( _
	document As Document, _
	ids As ISet(Of ElementId), _
	filename As String, _
	saveOptions As FabricationSaveJobOptions _
) As ISet(Of ElementId)
Visual C++
public:
static ISet<ElementId^>^ SaveAsFabricationJob(
	Document^ document, 
	ISet<ElementId^>^ ids, 
	String^ filename, 
	FabricationSaveJobOptions^ saveOptions
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document.
ids
Type: System.Collections.GenericISetElementId
List of element Ids of fabrication parts or assemblies and group elements that contain fabrication parts to save. Non-fabrication part elements will be ignored.
filename
Type: SystemString
The full path and filename of the fabrication job to save.
saveOptions
Type: Autodesk.Revit.DB.FabricationFabricationSaveJobOptions
Options for the save operation.

Return Value

Returns a list of fabrication part element Ids that were saved to the fabrication job.

Remarks

Only fabrication MAJ files are supported.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException Fabrication configuration is missing.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException the path to the filename must already exist and be writeable
Autodesk.Revit.ExceptionsInvalidPathArgumentException The destination file name includes one or more invalid characters.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →