Legend element isOverflowing property is not working properly

506
3
10-24-2019 02:09 AM
matuskajba
New Contributor II

I have a very strange problem with printing workflow.

The simplified workflow is that I am printing web map with template for legend. With arpcy.mapping.MapDocument.isOverflowing I am checking, if legend overflows, and if it overflows, I am trying to use template with bigger frame for legend.

The problem is that the isOverlowing value doesn’t work correctly when the script is run from geoprocessing service. If I run the script as a geoprocessing service, I can see in the resulting messages and server log, that the isOverlowing property was equal to false. However if I save the map document I can see the three red dots indicating that legend is overflowing and legend is indeed overflowing. Strangely enough, if I run the same script as a script within IDLE, with the same parameters, same version on python, on the very same server the geoprocessing services was run, I can see in the messages that the isOverflowing property was correctly equal to true.

Simplified script and sample mxd are enclosed. All you need is to set mxdPath on 3th line to path for enclosed mxd document and give it a try. The isOverflowing property value is indicated in messages.

Running with ArcGIS for Server 10.6.1.

Any idea, why it is different with geoprocessing service, or any suggestion how to fix it would be much appreciated.

 

Thank you.

0 Kudos
3 Replies
FlorianSteiner
New Contributor III

Exaktly the same question here!

  • Using custom print-script locally: No problem
  • Using custom print-script published as GP-Service on ArcGIS Server 10.6: Does not recognize "isOverflowing".

Any ideas welcome!

0 Kudos
KeithMiller3
New Contributor III

I'm also having this problem. Works in the Map Documents as a local script but not as a GP Service. Did you ever find a solution to it? I'm using ArcGIS Server 10.7.1.

0 Kudos
matuskajba
New Contributor II

Unfortunately not. I have reported the problem to our local esri distributor, but I didn't get any response, so I don't event know, if this was reported to esri as a bug. 

0 Kudos