Changing zoom levels mess up display colors of a surface

Changing zoom levels mess up display colors of a surface

Anonymous
Not applicable
571 Views
2 Replies
Message 1 of 3

Changing zoom levels mess up display colors of a surface

Anonymous
Not applicable

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);

 

0 Likes
572 Views
2 Replies
Replies (2)
Message 2 of 3

L.Maas
Mentor
Mentor

I would advise to post this question in the Revit API forum.

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 3 of 3

Anonymous
Not applicable

I think you are right. Thanks!

0 Likes