Subscribe to this thread
Home - General / All posts - Relinking ecw-files
klausk115 post(s)
#19-Jan-15 09:41

Hallo,

I have several map-files with linked ecw- images. In future I will organize these ecw-files on a local NAS-Server.

The old path is

D:\_Buero\GIS_allg

image1.ecw

image2.ecw

and the new one will be

Z:\x-Buero-uebergreifend\GIS-allgemein

image1.ecw

image2.ecw

Can I do this with a script?

thx

cartomatic

905 post(s)
#19-Jan-15 09:43

it is a limitation of the api - no means to link ecw. though i would like to be be wrong on that


maps made easy - www.cartomatic.pl || www.cartoninjas.net

adamw


10,447 post(s)
#09-Feb-15 08:50

This can be done via UI scripting, but, yes, that's a roundabout way.

See the UserInterface object (accessed via Application.UserInterface) for details - in a nutshell, you'd get the UserInterface object, run a File - Link - Image command (UserInterface.InvokeCommand), then manipulate the dialog to select the file you want (UserInterface.ModalDialog will return the dialog object, the controls are accessed via UserInterfaceDialog.ControlSet, UserInterfaceDialog.Accept will "click" the OK button), then wait for the link dialog to appear and manipulate that dialog as well.

There are examples of doing things like that on this forum. There are several gotchas (eg, the script has to be run in a separate thread and there should be some code to wait when one dialog goes away and another appears) and some learning curve, but in the end it's not too difficult, you basically write a line of code for each click that you'd do in the UI, that's it.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.