Create Method


Creates a new point cloud type for a given point cloud engine.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2012

Syntax

C#
public static PointCloudType Create(
	Document document,
	string engineIdentifier,
	string typeIdentifier
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	engineIdentifier As String, _
	typeIdentifier As String _
) As PointCloudType
Visual C++
public:
static PointCloudType^ Create(
	Document^ document, 
	String^ engineIdentifier, 
	String^ typeIdentifier
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document in which to create the point cloud.
engineIdentifier
Type: System String
The string identifying the engine to be invoked. It should be the file extension or engine identifier registered by the third party.
typeIdentifier
Type: System String
The file name or the identification string for a non-file based engine.

Return Value

The newly created PointCloudType object to be used to create instances of this point cloud.

Remarks

A list of supported engine identifiers and whether they are file-based or not can be obtained from PointCloudEngineRegistry. The method GetSupportedEngines() returns a list of the identifiers registered for engines.

Examples

Copy C#
private PointCloudInstance CreatePointCloud(Document doc)
{
    PointCloudType type = PointCloudType.Create(doc, "rcs", "c:\\32_cafeteria.rcs");
    return (PointCloudInstance.Create(doc, type.Id, Transform.Identity));
}
Copy VB.NET
Private Function CreatePointCloud(doc As Document) As PointCloudInstance
    Dim type As PointCloudType = PointCloudType.Create(doc, "rcs", "c:\32_cafeteria.rcs")
    Return (PointCloudInstance.Create(doc, type.Id, Transform.Identity))
End Function

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The engine identifier was not found in the Revit session. -or- document is not a project document.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions FileNotFoundException The external file could not be found or loaded.
Autodesk.Revit.Exceptions InvalidOperationException Unable to create a point cloud from the third party engine.
Autodesk.Revit.Exceptions ModificationForbiddenException 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.Exceptions ModificationOutsideTransactionException 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 →