Hi,
When I use the MAPIINSERT command on the commandline (with FILEDIA set to 0), I can't insert any image file with a total path length of 132 chrachters long.
But when I select an image file thru the file dialog browser (FILEDIA set to 1) it does insert the image.
Is this by design or a bug?
Kind regards,
Edward
Hi,
you can't insert the image or you can insert the image, but the world-file is not recognized (and the image is positioned at 0,0)?
I guess second and so my way to work is to avoid longer path-names.
If it's as design? I don't know, but there are some limitations around 132-length, e.g. like that >>>Lisp GETSTRING<<<., a view days ago we had a thread with ObjectData String length also reduced to 132 characters, ... so just use shorter paths 😉
- alfred -
Hi Alfred,
It has indeed to do with a Lisp string which I built from using the 'strcat' function. The result string will then be put in a lisp command like this:
(command "_.MAPIINSERT" <full path name> ...)
The lisp function or command line doesn't accept a full path name that is longer than 132 characters.
And sadly I don't have the control of how project path names are used within the organization. So users will definitly run into this problem when they use my lisp routine with paths that are longer than 132 characters.
I will built a warning message in my lisp routine by checking the path length up front and I will make this as a known issue with my help documentation.
The work-a-round is to use the MAPIINSERT command (with FILEDIA set to 1) from the standard menu.
Thanks.
Edward
Hi,
>> The work-a-round is to use the MAPIINSERT command (with FILEDIA set to 1) from the standard menu.
Be careful! That workaround is ok for images that don't have world files (and so are not georeferenced).
But for files with seperate world file like JGW path-name's longer than 132 characters are also problematic.
>> And sadly I don't have the control of how project path names are used within the organization.
Maybe you have chances by using different drive-letters for image network-paths.
- alfred -
Hi Alfred,
Thanks for the suggestions and for thinking with me. Much appreciated!
I'm aware of the requirements of georeferenced images and their corresponding World Files.
And I have fixed the problem by using the following:
(command "_.IMAGE" "ATTACH" <full file name> <insertion point> <scale factor> <rotation>)
This command doesn't have the limitations of 132 characters.
And of course you have to know what the scale factor and rotation is. Which in my case I do. 😉
Thanks again.
Edward