Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images don't show in AutoCAD until you manually Reload them in the xref manager #27

Closed
worlds6440 opened this issue Feb 2, 2018 · 8 comments

Comments

@worlds6440
Copy link

Images with relative paths fail to show on DXFs opened in AutoCAD by default. XRef manager shows them as !unreadable. You have to go to the xref manager and manually 'Reload' them before they show.

##POTENTIAL FIX:
I found that you need to add the following to the headers section

'''
9
$PROJECTNAME
1

'''

##REASON:
If the value after the 1 is left blank, it uses the DXF file's path as the initial place to look when loading images and shows the images straight away.

@mozman
Copy link
Owner

mozman commented Feb 2, 2018

setting header vars is easy:

yourdrawing.header['$PROJECTNAME'] = ''

DXF Reference says to $PROJECTNAME:

Assigns a project name to the current drawing. Used when an external reference or image is not found on its original path. The project name points to a section in the registry that can contain one or more search paths for each project name defined. Project names and their search directories are created from the Files tab of the Options dialog box

I will add $PROJECTNAME='' as default value in my templates files.

Thanks for your contribution.

Manfred

@mozman
Copy link
Owner

mozman commented Feb 2, 2018

I saw $PROJECTNAME='' is the default in my template files, I will add a HOWTO section for this problem with existing DXF files.

@mozman
Copy link
Owner

mozman commented Feb 2, 2018

Now I got no error message on opening drawings, but the image is still not shown, reference status 'Nicht lesbar' (not readable), I have to run 'Alle Referenzen neu laden' (reload all references) to see the image.

Any suggestion about this? Because the DXF reference does not have ANY information about such internal state problems or how to organize this internal structures correct.

@worlds6440
Copy link
Author

Progress

After extensive tests, this appears to be a DXF reading bugfeature with AutoCAD and images with a relative path or no path.

If the filename in the IMAGEDEF contains the full path (absolute in AutoCAD) then it shows on loading, otherwise it won't display (reports as unreadable) until you manually reload using XREF manager.

I performed the same tests when loading identical files (but resaved as DWGs) and they loaded and displayed the images, even with relative / no paths.

Summary

I haven't found a fix for images with a relative path in DXF. However, a workaround appears to be to save the full file path in the DXF or save it as a DWG.

@mozman
Copy link
Owner

mozman commented Feb 2, 2018

Thank you, I will add this information to the howto section.

@mozman mozman closed this as completed Feb 2, 2018
@ardamaks
Copy link

Guys, this issue is still persistent in ACAD 2021.
How can be solved. Thanks

@luzader
Copy link

luzader commented Mar 8, 2023

This is still a problem with DWG TrueView 2023.

Has anyone else noticed that very short simple image file names seem to avoid this problem? Once I ensured that the image file's name was short and had no special characters (letters, numbers and underscores only) the problem seemed to go away. I didn't rigorously analyze the behavior as its very time consuming.

Also: You can safely put the image in a subdirectory and use a relative path. The name of the subdirectory does not seem to trigger this problem, provided that the image file name itself is very short and simple.

Also pro tip: The XRef manager exists in DWG TrueView, but access to it is only possible if you have a completely broken reference. Create a DXF with a reference to a non-existent file, then the error dialog will let you open the XRef Manager. Once it is open you can pin it and it will be open next time, even if you have no broken references.

@mozman
Copy link
Owner

mozman commented Mar 9, 2023

@luzader Thank you!

If you don't mind, I'll add your tips to the HowTo section.

Repository owner locked and limited conversation to collaborators Mar 9, 2023
@mozman mozman converted this issue into discussion #845 Mar 9, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants