Select to view content in your preferred language

IActiveView.Output times out

1986
14
10-14-2010 03:23 AM
BjørnarSundsbø
Deactivated User
I use IMapDocument and its ActiveView.Output to export a bitmap from an MXD documen to a bitmap. This works just fine with an MXD with local data. However, when exporting from an MXD connected to an ArcGIS Server Map Service, the output method seems to time out, and nothing is exported to the bitmap.

Looking at the jobs folder on the arcgisserver, I can see new cache images are crated for the extent I exported. If I zoom out one level, and back in, I get the map image. So in other words I have to export to every extent twice to get an exported map.

What is the reason for this? Is there a timeout setting I have yet to find? The code for exporting is pretty much what you see on different threads here. I do not believe it is the actual code used to export which is the problem.

I use ArcObjects 9.3. I've seen in version 10 there is an ITrackCancel2 interface which has a Timeout property, which might be something I'm looking for. But I hope there is a different way of allowing the Output to wait a bit longer for result from the MapServer service.
0 Kudos
14 Replies
OttarViken_Valvåg
Regular Contributor
When using MIME access, the output image is stored as a .tmp file in the output directory, streamed to the client, and then deleted. When using url access, the output image is stored as an image file in the output directory, its url is returned to the client, and the image will reside in the output directory for 10 minutes. So the output directory never serves as a cache, it's just a means for returning dynamically generated images to the client.

Using MIME access instead of URL access has no negative impact on performance.
0 Kudos
BjørnarSundsbø
Deactivated User
Thanks, Ottar.

Any luck/time finding out what is really going on, and why it doesn't work when using MIME + URL?

Also, we have pretty much the same problem when using a WMS layer in the mxd used by the client. We get the map image, but WMS layer is absent from the image.

Bjørnar
0 Kudos
OttarViken_Valvåg
Regular Contributor
It sounds like ArcMap / ArcEngine is having problems downloading the generated image. Check that the output directory of your ArcGIS Server has a virtual path that is accessible to your client. Also maybe check to see if your client is using a proxy server for outgoing internet connections?
0 Kudos
BjørnarSundsbø
Deactivated User
No issues with proxy. I checked the virtual path setup, and tested it. So did Toni, so it seems to be working as it should. I think the WMS issue is the most pressing matter at the moment.
0 Kudos
BjørnarSundsbø
Deactivated User
I just noticed something interesting; when having an MXD with a reference to a WMS layer, the export operation returns an empty image. However, a PNG for the requested area is created in the temp folder for my user. The output method fails in other words to draw that layer onto the hdc passed into the Output method.

The case is the same with the ArcGIS Map Server request where I get an empty image the first time I export an image, and get it the next time. This was, as described in an earlier post, resolved by changing from MIME + URL to MIME for output type for the service. This temp file is also created when output is MIME only.

Why is the Output method not rendering the WMS and ArcGIS Map layers to the hdc when it is obviously retrieving the image and should be able to do so?

Bjørnar
0 Kudos