Message 1 of 3
Changing zoom levels mess up display colors of a surface
Not applicable
10-25-2016
06:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I am rendering some colors over a surface using SpatialFieldManager and AnalysisDisplayStyle. So basically I select the top face of a floor and then for different points on the floor, I have their RGB values. It works fine and I can see the rendered color surface. However, when I change the zoom level of the view for example with mouse scroll, this messes up the display colors on the surface. Following is the :
AnalysisDisplayColoredSurfaceSettings coloredSurfaceSettings = new AnalysisDisplayColoredSurfaceSettings(); AnalysisDisplayColorSettings colorSettings = new AnalysisDisplayColorSettings(); Autodesk.Revit.DB.Color blue = new Autodesk.Revit.DB.Color(0, 0, 255); Autodesk.Revit.DB.Color red = new Autodesk.Revit.DB.Color(255, 0, 0); colorSettings.MaxColor = red; colorSettings.MinColor = blue; AnalysisDisplayLegendSettings legendSettings = new AnalysisDisplayLegendSettings(); this.analysisDisplayStyle = AnalysisDisplayStyle.CreateAnalysisDisplayStyle(doc, "Colored Surface", coloredSurfaceSettings, colorSettings, legendSettings);
SpatialFieldManager sfm = new SpatialFieldManager(); sfm.UpdateSpatialFieldPrimitive(idX, new FieldDomainPointsByUV(points), new FieldValues(values), _schemaId);