Question

DGNStyler Cell Color

  • 26 February 2016
  • 11 replies
  • 16 views

Badge +1

Hi.

I am writing to a Microstation V8 DGN. I have used the DGNStyler transfomer to convert a series of points to cells, and now I want to set the color of the cells based on an attribute. However there doesn't seem to be the option in DGNStyler or in any of the igds format attributes to set the color of a cell.

Any ideas?

Thanks,


11 replies

Badge +1

I forgot to mention that I am using FME 2015

Badge

@aquamarine - Not sure if this helps at all, but I've done this using the attributevaluemapper. So I take the source value and set the destination value to the color I want. Then map that to igds_color (or in your case igds_cell_element_color).

Badge +1

Thanks @candimk . I set the igds_cell_element_color to the desired value. When I open up the file in Microstation and select the cell with the Element Information tool, the cell itself is set to the correct color, however the "Shape" feature which is under the cell name in the Selection tree, is set to a default color, and it is this default color that the cell is actually displaying.

Is there anyway to set the cell's "Shape" color in FME? I am using a shared cell by the way.

Badge

@aquamarine - Sorry, I don't work with shared cells a lot. I know there is a difference between the point and graphic cells, and that is can be hard to change the color of the graphic cells. My only other idea to look at is if that "shape" is on a different layer/level than the cell itself. We had some complicated cells at my old job and when people would create them, the underlying elements would sometimes be on different levels and that could cause issues. You would then have to specify that level and type as a new color. Which I don't know if that is what you want or can do in your situation. Sorry I couldn't be of more help. Good luck.

Badge +1

@candimk Yes it looks like the shape itself is not set to any level which may be the problem. I'm not sure how to set the level though as I have written the whole DGN to a particular level but it's not showing up for the Cell's Shape.

Badge

@aquamarine - So if you place that cell in your DGN from your cell library what level is that shape on? Then can you just add that layer into the DGNLIB and see if it comes through? Does that make sense? I don't write a lot of DGNs, we go from CAD TO GIS. Not the other way around. By the way, what is your reader?

Badge

Hi @aquamarine,

as @candimk mentioned it is important to know whether your cell is a Point cell or a Graphic cell. If the cell is Point, all its elements will have the same color and you have control over the color, you can set it e.g. with parameters within DGNStyler Color GroupBox. If the cell is Graphic, its element visual attributes (including color) are set when the cell is created and you can not change them.

Have you tried DGNStyler Color parameters? Was the color not applied to shape only? I.e. was only the fill color missing?

Badge +1

Hi @LenaAtSafe, I have a feeling it must be a graphic cell, because when I set the colour in the DGNStyler it doesn't come through either to the outline or the fill of the cell shape.

How can I confirm if it is a graphic cell?

Thanks,

Badge +1

Hi @LenaAtSafe I've checked in Microstation and it is definitely a Graphic Cell. Is there any way around this in terms of setting the colour with Graphic Cells? Would setting the Relative Graphic Cells option in the DGNStyler make any difference?

Thanks

Badge

Hi @aquamarine,

if the cell is Graphic you have only two options:

  • you could re-create the cell in MicroStation and make it a Point cell - this will give you full control over the cell visual attributes in the future, however, this can be done only if all cell elements have the same color/width/style/level;
  • you could re-create the cell in MicroStation, leave it as a Graphic cell but set all visual attributes the way you need them - the cell element visual attributes will be preset once again (i.e. you won't have control over them), but they will be what you need them to be for now.

Relative mode for Graphic cells affects only cell element levels.

Badge +1

Thanks @LenaAtSafe . I converted the graphic cell to a point cell in the cell library and was then able to set the colours using DGNStyler. Thanks for your help!

Reply