Skip to main content

Share diagram layer definitions across diagram templates

When combining subtype group layers with sophisticated symbols and complex label settings for each diagram sub layer, the size of diagram layer definition set up on a template can become weighty. Furthermore, the greater the number of attributes existing for the various network sources, the larger the size of the diagram layer definition.

Controlling diagram layer definition configured on diagram templates is specially recommended when working with published utility network or trace network services. In this case, the best consists in sharing diagram layer definition across diagram templates to optimize server startup time and avoid increasing the memory footprint.

Before controlling diagram layer definition on templates and reduce their number across the existing diagram templates, it is important to understand what makes the layer definition to vary from a diagram template to another.

Understand how diagram layer definitions are different

When running the Add Diagram Template tool to add a new diagram template to a utility network without specifying any particular diagram layer definition at its creation, a default simple randomized diagram layer definition is initialized on this template. This diagram layer definition is different for any newly created template.

Furthermore, when running the Alter Diagram Template tool using the Reset the diagram template layer definition to default option on various templates, the reset diagram layer definitions vary from one diagram template to another.

Running the Create Diagram Layer Definition tool to initialize diagram layer definition on templates is another use cases. Even this tool applies on various templates to import the layer properties present in a same network map, the additional diagram sub layers created to represent collapsed polygons, polygon containers, edge objects and junction objects are created with default randomized colors on each template.

Template layer definition analysis at server startup

When a utility network service or trace network service starts on an ArcGIS Server machine, the diagram templates are loaded in memory, the layer definition on each loaded template is systematically analyzed and compared to the layer definitions set on the templates that are already loaded. If a same layer definition already exists in memory, it is automatically “shared” with the template currently at loading. This avoids loading a same layer definition multiple times and vainly increasing the memory footprint on the server.

Template layer definition sharing

With the above in mind, it is recommended that the network owner limits the number of various diagram layer definition across the existing diagram templates. The best could be to create only one or two diagram layer definition files (.ndl file) and import one or the other file to each existing template; for example:

  1. Set up a first diagram layer definition with rich symbology and labels. Then, run the Import Diagram Template Definitions tool to import this diagram layer definition to each template used to create interesting diagrams that will be shared with others (switching diagram, interconnected substations, and so on).

  2. Set up a second diagram layer definition with more simple symbology and labels. Then, import it on templates that are used to generate diagrams for quality assurance and quality control, for example.

Note:

Such a rich or simple layer definition can already exist for a particular template. In this case, running the Export Diagram Template Definition tool allows exporting it from that template and re-importing it to other templates so these templates are set up with the same layer definition.

Control shared diagram layer definitions across diagram templates

To control and optimize how diagram layer definitions are properly shared across the diagram templates, the network owner can refer to the following points:

  • The messages logged at server start time

  • The Layer Definitions Sharing column in the Network Diagrams tab

Important:

These new features start with Enterprise 12.1 and ArcGIS Pro 3.7.

Understanding messages logged when the server starts up

Starting with Enterprise 12.1, new messages are logged when the service starts up to help the network owner identify the various layer definitions that exist on diagram templates and determine whether they are already shared between templates. To analyze these logs, the network owner can sign in to the ArcGIS Server Manager and select Info as the Log Filter level. Then, once the utility network or trace network service started, he must search for particular messages in the View Log Messages list such as those followings:

  • Level = INFO, Message = Template A, Template B share the same layer definition

  • Level = WARNING, Message = Template C does not share its layer definition with any other diagram template

  • Level = WARNING, Message = Not all diagram templates have a layer definition ID

WARNING logs such as Template C does not share its layer definition with any other diagram template inform the network owner about the templates for which the diagram layer definitions are different from any other template.

Counting INFO logs such as Template A, Template B share the same layer definition allows the network owner to know the number of various layer definitions that are already shared between existing diagram templates. He can then decide whether he wants to export one and shares it with a few other templates to further reduce the number of shared layer definition.

WARNING logs such as Not all diagram templates have a layer definition ID display when layer definitions have been configured on diagram templates using a version of ArcGIS Pro prior to 3.7. Layer definition IDs allowing an efficient analysis of the layer definition sharing between templates at service start time, it is strongly recommended to initialize such an ID on each diagram template. This ID setting starts with ArcGIS Pro 3.7 when the network owner creates or alters diagram template layer definition using one of the following tools:

Understanding the Layer Definitions Sharing column in the Network Diagrams tab

To control whether layer definition IDs exist on diagram templates and how they are shared between these templates, the network owner can open the Network Diagrams tab available from the utility network or trace network Layer Properties dialog, and have a look to the Layer Definitions Sharing column. This tab shows the list of the N diagram templates existing for the network. The Layer Definitions Sharing cell is empty for any diagram template existing with a layer definition set up using ArcGIS Pro versions prior to 3.7. It is no longer empty once the diagram template layer definition is configured or altered using ArcGIS Pro 3.7 or later. This column doesn't strictly show the layer definition ID existing on a template. It shows numbers that can change for any template after modifying the diagram layer definition on just one of the existing templates. These numbers are ordered from 1 to N maximum if each of the N listed templates got its diagram layer definition initialized using ArcGIS Pro 3.7 or later. When N is the maximum of these numbers, this means that none of the N templates shares the same diagram layer definition with another existing template. A same number on multiple diagram templates means that each of these diagram templates exist with a same layer definition ID; that is, these templates share the same diagram layer definition. The maximum value in this column informs about the number of various diagram layer definition shared across the existing templates.

With all the above explanations in mind, the network owner can analyze the Layer Definitions Sharing column and answer the following questions:

  • Is there a layer definition ID on each existing diagram template allowing an efficient analysis of the layer definition sharing between templates at service start time?

  • How many various diagram layer definitions exist across the diagram templates?

  • What are the templates that already shared a same diagram layer definition?

  • Is it possible to import one of the diagram layer definitions that is already shared between diagram templates into a few other diagram templates, in order to further reduce the number of layer definitions shared between all templates?