I’m using GoDiagram 184.108.40.206, and I am having a problem using multiple GoLayers in a single document. My goal is the following: I want to have one layer with GoNodes on it and another with GoShapes. This is all in my own GoView which is derived off of GoView. In the constructor for my view I do the following:
Document.SuspendsUpdates = true;
shapesLayer = Document.Layers.CreateNewLayerBefore(Document.DefaultLayer);
shapesLayer.Identifier = “Shapes”;
Document.SuspendsUpdates = false;
The problem is that when I add shapes to the shapesLayer, I cannot see them. I inserted a breakpoint in my code just after the shape has been added and noted the following:
- The shapesLayer is not null
- The shapesLayer.Document is equal to this.Document and shapesLayer.IsInDocument is true
- shapesLayer.View is null and shapesLayer.IsInView is false.
- shapesLayer.AllowView is true.
- shapesLayer.Count correctly reflects the shapes which have been added to it. this.Document also reflects the added shapes.
I also tried moving the shapes from one layer to another, and while they were visible in the DefaultLayer, they became invisible as soon as they were moved to the shapes layer. I have tried both CreateNewLayerBefore and CreateNewLayerAfter and neither work.
Thanks in advace for your help with this issue. I’d be happy to provide more information about what I’m doing here as necessary, as there is already alot of code in this custom GoView.