PointCloudType.GetReCapProject Method

PointCloudTypeGetReCapProject Method

This method provides a direct entry point to get access to an object from the ReCap SDK (ReCapWrapper.RCProject) from Revit. This object represents the point cloud from the RC file path stored in PointCloudType. The ReCap assembly AdskRcManaged.dll will need to be included into code using this method.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public RCProject GetReCapProject()
Public Function GetReCapProject As RCProject
public:
RCProject^ GetReCapProject()
member GetReCapProject : unit -> RCProject 

Return Value

RCProject
Exceptions
ExceptionCondition
FileAccessException The file or PointCloudEngine is not ReCap based.
InvalidOperationException Exception happens when ReCap loading the project.
Remarks
The coordinate system in RCProject is defined by Point Cloud. Please refer to ReCap SDK document for RCProject::getCoordinateSystem. If you need points converted to the modeling coordinate system in Revit, you can obtain the transformation matrix from PointCloudInstance GetTransform.
Example
private Autodesk.RealityComputing.Managed.RCProject GetRCProject(Document doc)
{
   PointCloudType type = PointCloudType.Create(doc, "rcs", "c:\\32_cafeteria.rcs");
   // Get RCProject, you need to include AdskRcManaged.dll
   Autodesk.RealityComputing.Managed.RCProject proj = type.GetReCapProject();
   // You can get access to functions from ReCap SDK, for example get total point number of ReCap project
   UInt64 numOfPoints = proj.GetNumberOfPoints();
   return type.GetReCapProject();
}
Private Function GetRCProject(ByVal doc As Document) As Autodesk.RealityComputing.Managed.RCProject
    Dim type As PointCloudType = PointCloudType.Create(doc, "rcs", "c:\32_cafeteria.rcs")
    ' Get RCProject, you need to include AdskRcManaged.dll
    Dim proj As Autodesk.RealityComputing.Managed.RCProject = type.GetReCapProject()
    ' You can get access to functions from ReCap SDK, for example get total point number of ReCap project
    Dim numOfPoints As ULong = proj.GetNumberOfPoints()
    Return type.GetReCapProject()
End Function

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

See Also