AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Maximum file path lenght with MAPIINSERT commend line

4 REPLIES 4
Reply
Message 1 of 5
lapis
971 Views, 4 Replies

Maximum file path lenght with MAPIINSERT commend line

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

4 REPLIES 4
Message 2 of 5
Alfred.NESWADBA
in reply to: lapis

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 5
lapis
in reply to: Alfred.NESWADBA

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

Message 4 of 5
Alfred.NESWADBA
in reply to: lapis

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 5 of 5
lapis
in reply to: Alfred.NESWADBA

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost