Changing the Layer

Hi,

when i load my nodes from xml i must load the “Links” as last to get the right PartID for the Ports. But when i add them to the Document, the Link is painted before the Nodes! I want the have them after the nodes (in the Background). How can i do this?

Thanks

xbromy

When initializing the document, create a separate layer for the links that is in front of the default layer:
doc.LinksLayer = doc.Layers.CreateNewLayerAfter(doc.Layers.Default)
For completeness I’ll mention that if you want the links to be in a layer behind the default layer:
doc.LinksLayer = doc.Layers.CreateNewLayerBefore(doc.Layers.Default)

Thanks it works!