Creates a new pipe schedule type with the given name.
Namespace: Autodesk.Revit.DB.PlumbingAssembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since: 2017
Syntax
C# |
---|
public static PipeScheduleType Create( Document doc, string name ) |
Visual Basic |
---|
Public Shared Function Create ( _ doc As Document, _ name As String _ ) As PipeScheduleType |
Visual C++ |
---|
public: static PipeScheduleType^ Create( Document^ doc, String^ name ) |
Parameters
- doc
- Type: Autodesk.Revit.DB..::..Document
The document
- name
- Type: System..::..String
The name of requested schedule type.
Return Value
Returns the newly created schedule type.
Remarks
If the name is already taken by an existing schedule type, an InvalidOperationException will be thrown.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | name is an empty string. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions..::..DisabledDisciplineException | None of the following disciplines is enabled: Mechanical Electrical Piping. |
Autodesk.Revit.Exceptions..::..InvalidOperationException | The name is already taken by an existing pipe schedule type. |