Message 1 of 7
Change the color mode of a point could

Not applicable
11-23-2020
05:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm creating a small plugin that allow me to change the color mode of a point cloud, so i found the Pointcloudcolorsetting Class, but i Don't know how to apply it to my PointCloudInstance.
UIDocument uiDoc = commandData.Application.ActiveUIDocument;
Document doc = uiDoc.Document;
Document doc = uiDoc.Document;
FilteredElementCollector collector1 = new FilteredElementCollector(doc);
ICollection<Element> collection = collector1.OfClass(typeof(PointCloudInstance)).ToElements();
PointCloudOverrides over = new PointCloudOverrides();
PointCloudOverrideSettings setting = new PointCloudOverrideSettings();
setting.ColorMode = PointCloudColorMode.Normals;
ICollection<Element> collection = collector1.OfClass(typeof(PointCloudInstance)).ToElements();
PointCloudOverrides over = new PointCloudOverrides();
PointCloudOverrideSettings setting = new PointCloudOverrideSettings();
setting.ColorMode = PointCloudColorMode.Normals;
Transaction trans = new Transaction(doc, "color mode");
trans.Start();
foreach (PointCloudInstance elem in collection)
{
over.SetPointCloudScanOverrideSettings(elem.Id, setting);
}
trans.Commit();
return Result.Succeeded;
trans.Start();
foreach (PointCloudInstance elem in collection)
{
over.SetPointCloudScanOverrideSettings(elem.Id, setting);
}
trans.Commit();
return Result.Succeeded;
I wrote this, but it is not wotrking.
if someone can help me.