Hi,
You must call the void PromptForPointCloudSelection wuth good arguments :
Check this :
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
UIApplication uiApp = commandData.Application;
UIDocument uiDoc = uiApp.ActiveUIDocument;
Autodesk.Revit.ApplicationServices.Application app = uiApp.Application;
Document doc = uiDoc.Document;
Selection currentSel = uiDoc.Selection;
//Define a Reference object to accept the pick result.
Reference pickedRef = null;
//Pick a point cloud instance
Selection sel = uiApp.ActiveUIDocument.Selection;
pickedRef = sel.PickObject(ObjectType.Element, "Select a point cloud instance");
Element elem = doc.GetElement(pickedRef);
//Test if point cloud instance is selected
if (elem.Category.Id.IntegerValue != (int)BuiltInCategory.OST_PointClouds)
{
TaskDialog.Show("Revit", "Please select a point cloud instance !");
return null;
}
else
{
PointCloudInstance my_pci = elem as PointCloudInstance;
PromptForPointCloudSelection (uiDoc , my_pci)
}
}