Select to view content in your preferred language

Customized pagx in defense mapping?

1357
7
Jump to solution
11-28-2022 08:58 PM
hm_stella
Esri Contributor

Hi folks, 

I am currently working on automated cartography using defense & production mapping.  I could successfully generate a pdf file using the default pagx file (TM50_Layout.pagx) found in Product Files. 

However, I'd like to make some modifications on that pagx file and make my own pdf which fits to specific qualifications. They'll be some changes in layers name and symbols.

I have already added some new symbols in TM.stylx and checked that the modified pagx loads those symbols very well. The only thing left is to implement that modified pagx file into the EPM using workflow manager. I set the file name as TM50_Layout.pagx as it has to be and run the SAMPLE CARTOGRAPHY AUTOMATED task group. 

When it reached the generate product layout step, it stopped. I was trying to run both the Generate Product Layout for Job tool and Generate Product Layout tool, and got the same Error 999999 messages. 

I am wondering that the defense mapping does not allow users to use their own pagx files or it is just the error. If anyone knows the answer, please let me know. 

Thank you!

0 Kudos
2 Solutions

Accepted Solutions
GCRice_EsriPS
Occasional Contributor

Hello,

We've run Generate Product Layout (GPL) with significant changes to the COTS layouts with no problem. Since GPL runs several GP tools in the process, the goal is to identify exactly which tool/process is failing. That might give you some ideas as to what layout change is causing the issue. So, here are a few tips for troubleshooting:

1. Test using the GPL tool manually outside of Workflow Manager. This is more efficient and you should be able to see in the GP results dialog more specifically where the 99999 error is occurring.

2. The exact operations (tools) run by GPL are stored in in the DMDProducts.json file in the Defense Mapping product data\ReferenceData\ProductDefinitions folder. You can find your product in that json, then see all processes that are run from top to bottom in order. You can back up this file and make changes, for example you could remove some operations to speed up the process for testing. You can't comment out lines in the .json, but you can remove them. Once you identify where GPL is failing, you could strip down the .json to just that operation and test layout updates until you have a working layout. Much more efficient than running the entire GPL process each time.

Note that this DMDProducts.json can be further modified to add custom logic to GPL. This is not yet documented in the Help because we are planning to include a GUI in a future release that helps you update this file.

 

View solution in original post

Bo_King
Esri Alum

@hm_stella just a note to let you know that we have fixed the issue with Generate Product Layout when labeling is turned off for all layers.  This fix will be included in the upcoming ArcGIS Pro 3.1 release. 

Regards,  Bo

View solution in original post

7 Replies
Bo_King
Esri Alum

Hello @hm_stella 

Yes, custom templates are permitted and can be defined in the Layout Template option of the Generate Product Layout  tool.  If you have already tried your custom template using this option, then one thing you might try is to verify that your PAGX was not saved with broken data sources for layers.   

Regards,  Bo

0 Kudos
hm_stella
Esri Contributor

Hi @Bo_King ,

 

I double-checked if the PAGX has saved without any broken layers, and for sure it doesn't have any of those layers. All layers are connected with the data source very well.

 

I ran the Cartography - Automated workflow again in the workflow manager (classic) in ArcGIS Pro, and it still had the same issue - just stop at the step of Generate Product.

hm_stella_0-1669940772380.png

 

Since the workflow manager does not give specific messages why it stopped, I traced back to the workflowstep toolbox and ran GenerateProductLayoutforJob tool. 

hm_stella_1-1669940772382.png

 

The failed messages were like this, 

Product Type is TM50

sheet = '16572'

D:\LocalProcessing\CARTO_AUTO_JOB_820_(819)\Geodatabases\TM50_CARTO_TEST_16572_JOB_819.gdb\Job_TM50_Index

ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.

Failed to execute (GenerateProductLayout).

Failed script Generate Product Layout for Job...

Failed to execute (GenerateProductLayoutforJob).

hm_stella_2-1669940772383.png

 

Is there anything I can do to run the generate product layout tool without this error?

 

Thank you!

0 Kudos
DanHopkins
Esri Contributor

Hi @hm_stella 

The issue encountered when labelling is turned off has been addressed for ArcGIS Pro 3.1 Patch 2 (i.e. 3.1.2). Patch 2 should be available for download by the end of May. We have also addressed this issue in ArcGIS Pro 3.2.

Regards,

Dan

0 Kudos
GCRice_EsriPS
Occasional Contributor

Hello,

We've run Generate Product Layout (GPL) with significant changes to the COTS layouts with no problem. Since GPL runs several GP tools in the process, the goal is to identify exactly which tool/process is failing. That might give you some ideas as to what layout change is causing the issue. So, here are a few tips for troubleshooting:

1. Test using the GPL tool manually outside of Workflow Manager. This is more efficient and you should be able to see in the GP results dialog more specifically where the 99999 error is occurring.

2. The exact operations (tools) run by GPL are stored in in the DMDProducts.json file in the Defense Mapping product data\ReferenceData\ProductDefinitions folder. You can find your product in that json, then see all processes that are run from top to bottom in order. You can back up this file and make changes, for example you could remove some operations to speed up the process for testing. You can't comment out lines in the .json, but you can remove them. Once you identify where GPL is failing, you could strip down the .json to just that operation and test layout updates until you have a working layout. Much more efficient than running the entire GPL process each time.

Note that this DMDProducts.json can be further modified to add custom logic to GPL. This is not yet documented in the Help because we are planning to include a GUI in a future release that helps you update this file.

 

hm_stella
Esri Contributor

Hi @GCRice_EsriPS !

 

Thanks for your advice 🙂

I was able to see where the tool stops working - making annotations. I did not turn on any of layers' labels. After turning on some layers' labels, the tool works fine. 

 

Now, I know how to manage which tools to run in the process of GPL tool. Your reply was a big help!

By the way, I'd like to know if making annotations is the essential and must-have-to-do process for making the maps. Could you make an answer for this small curiosity?

 

Thanks!

0 Kudos
Bo_King
Esri Alum

@hm_stella We will investigate whether the GPL anno step can be skipped when labelling is turned off.

@GCRice_EsriPS thanks for the detailed response.

Bo_King
Esri Alum

@hm_stella just a note to let you know that we have fixed the issue with Generate Product Layout when labeling is turned off for all layers.  This fix will be included in the upcoming ArcGIS Pro 3.1 release. 

Regards,  Bo