Optimizes the length fabrication straight parts.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since:  2016

Syntax

C#
public static ISet<ElementId> OptimizeLengths(
	Document doc,
	ISet<ElementId> partIds
)
Visual Basic
Public Shared Function OptimizeLengths ( _
	doc As Document, _
	partIds As ISet(Of ElementId) _
) As ISet(Of ElementId)
Visual C++
public:
static ISet<ElementId^>^ OptimizeLengths(
	Document^ doc, 
	ISet<ElementId^>^ partIds
)

Parameters

doc
Type: Autodesk.Revit.DB..::..Document
The document.
partIds
Type: System.Collections.Generic..::..ISet<(Of <(<'ElementId>)>)>
The ids of the fabrication parts in a selected fabrication part run.

Return Value

New and modified fabrication part ids in the optimize

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentException There are no straight parts to optimize, or all parts are locked or locked by group membership.
Autodesk.Revit.Exceptions..::..ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions..::..InvalidOperationException this operation failed.

See Also