Create Method


Creates a new instance of pipe insulation.

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

Syntax

C#
public static PipeInsulation Create(
	Document document,
	ElementId pipeOrContentElementId,
	ElementId pipeInsulationTypeId,
	double Thickness
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	pipeOrContentElementId As ElementId, _
	pipeInsulationTypeId As ElementId, _
	Thickness As Double _
) As PipeInsulation
Visual C++
public:
static PipeInsulation^ Create(
	Document^ document, 
	ElementId^ pipeOrContentElementId, 
	ElementId^ pipeInsulationTypeId, 
	double Thickness
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document.
pipeOrContentElementId
Type: Autodesk.Revit.DBElementId
The pipe, fitting, accessory ElementId to which insulation will be added.
pipeInsulationTypeId
Type: Autodesk.Revit.DBElementId
The pipe insulation type. If the input pipe insulation type is InvalidElementId, the default insulation type from the document will be used.
Thickness
Type: SystemDouble
The thickness of the insulation.

Return Value

The newly created pipe insulation.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException This id does not represent a pipe, fitting, or accessory element. -or- This pipe insulation type is invalid. -or- Thickness is not valid for assignment to insulation or lining elements.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsDisabledDisciplineException None of the following disciplines is enabled: Mechanical Electrical Piping.
Autodesk.Revit.ExceptionsInvalidOperationException The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements).
Autodesk.Revit.ExceptionsModificationForbiddenException The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
Autodesk.Revit.ExceptionsModificationOutsideTransactionException The document has no open transaction.

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 →