getBoundingBox in VC++

getBoundingBox in VC++

Anonymous
Not applicable
740 Views
1 Reply
Message 1 of 2

getBoundingBox in VC++

Anonymous
Not applicable

I am creating a Revit 2018 AddIn in VC++. I am trying to get the bounding box of the point cloud. Here's the code:

 

Autodesk::Revit::DB::ElementCategoryFilter ^pointCloudFilter = gcnew Autodesk::Revit::DB::ElementCategoryFilter(Autodesk::Revit::DB::BuiltInCategory::OST_PointClouds);
Autodesk::Revit::DB::FilteredElementCollector ^collector = gcnew Autodesk::Revit::DB::FilteredElementCollector(doc);
System::Collections::Generic::IList<Autodesk::Revit::DB::Element^>^ pointClouds = collector->WherePasses(pointCloudFilter)->WhereElementIsNotElementType()->ToElements();

for each(Autodesk::Revit::DB::Element^ pointCloud in pointClouds) {
    Autodesk::Revit::DB::PointCloudInstance^ pointCloudInstance = dynamic_cast<Autodesk::Revit::DB::PointCloudInstance ^>(pointCloud);
    pointCloudInstance->getBoundingBox(nullptr);
}

While building, I get the error:

 

 

Error	C3767	'Autodesk::Revit::DB::Element::getBoundingBox': candidate function(s) not accessible	RevitCppAddIn	E:\RevitCppAddIn\RevitCppAddIn\RevitCppAddIn.cpp	20	

It seems that the method "getBoundingBox()" is protected. You can see it in the following screenshot as well.

 

BoundingBoxMethod.PNG

 

Is this a bug or is there any other way to get bounding box of a PointCloudInstance?

 

Note that the method "get_BoundingBox()" is public and works in C#.

0 Likes
741 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Any response from the Revit team?

0 Likes