-
I want to create a layer with a color and then add entities in the doc on that layer and for them to have the color of the Layer. Color color = new Color(1); From my understanding if I do this and then start adding entities, like a line with its layer specified as "LayerTest", the line should have the Layer's color. When I Do everything from above and then open the new Document, I see that the layer has been created but its color is still white (instead of red in this particular example). Am I doing something wrong or the layer coloring isn't working yet? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @AlexxCrp, Yesterday I merged a PR to fix this issue #219, for this particular case when you add entities make sure that you are assigning the layer to the entity and the color is set to Layer layer = new Layer("Test");
layer.Color = new Color(25);
this.Document.Layers.Add(layer);
Circle c = new Circle();
c.Center = new XYZ(0, 0, 0);
c.Radius = 10;
c.Layer = layer;
c.Color = Color.ByLayer;
this.Document.Entities.Add(c); If you are using the nuget package, let me know and I'll do a release or if you are using the repository make sure to update the master branch with the latest changes. Hope this helps. |
Beta Was this translation helpful? Give feedback.
Hi @AlexxCrp,
Yesterday I merged a PR to fix this issue #219, for this particular case when you add entities make sure that you are assigning the layer to the entity and the color is set to
ByLayer
(is the default but make sure is set as it is). Here is the example that I've used to test this feature:If you are using the nuget package, let me know and I'll do a release or if you are using the repository make sure to update the master branch with the lat…