Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DXF with image Xref are "unreadable" during initial loading

4 REPLIES 4
Reply
Message 1 of 5
philippeCAW5G
4031 Views, 4 Replies

DXF with image Xref are "unreadable" during initial loading

Hi, 

 

I'm a software developer and I generate some DXF with images (xref). Here's the problem I have:

 

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.

someone tried to solve this issue 2 years ago over here ( https://github.com/mozman/ezdxf/issues/27 ) I'm not using the same library but I have the same issue.

 

philippeCAW5G_0-1630531338126.png

If you Reload, everything thing is fine from now on. To reproduce the error you need to move the dxf +jpg somewhere else.

This doesn't seem to be an issue with pdf files but only images.

 

I'm using Autocad 2022 but I know this issue is also present in previous version.

 

You can reproduce with the following sample files available at (sample.dxf + image.jpg) : https://github.com/haplokuon/netDxf/tree/master/TestDxfDocument

 

Thanks for your help! 

Labels (3)
4 REPLIES 4
Message 2 of 5
jrreid
in reply to: philippeCAW5G

We are unable to download your files.

But I made a DWG with a JPB and PDF xref'd in.

DXFOUT to make a DXF file.

Opened the DXF file and all of my links worked.

 

Try saving your DXF as a DWG then close and reopen the DWG.

 

Hope This helps.

 

JRR.

Message 3 of 5
philippeCAW5G
in reply to: jrreid

Hi, 

 

Here's a link for the sample data might be easier to download:
https://drive.google.com/drive/folders/1w-yAVQinEk1H6aJD1tXLTfbOmKWC_ttb?usp=sharing

 

The issue seem to be only when we open the DXF with the "Open..." inside AutoCAD (see the screenshot below). If I directly double click the DXF file everything load correctly (usually)

philippeCAW5G_0-1630600980401.png

Message 4 of 5
jrreid
in reply to: philippeCAW5G

WOW!! That is crazy. Never seen this happen before.

You are right. If I use OPEN within AutoCAD it does not load the image.

Click onto the DXF and open no problem. It must have something to do with Pathing when using OPEN.

I would think this should register as an Error in Programming. I did a test on my files that I created and could not duplicate the problem.

 

Oh... I just opened your JPG and click SAVE using Paint. Problem seemed to have solved itself. I can open both ways and loads every time. Can't explain that but that is another solution for you to use. Open all JPGs first, click save and then open your DXFs.

 

But I was right about one thing. If you Open the DXF and it does not load... don't worry...

SAVEAS a DWG... Close and reopen the DWG either by OPEN within or Double Clicking the file it loads no problem.

 

At least you have three options to use without having to ask it to reload manually.

 

Hope this helps!!

 

JRR.

Message 5 of 5
philippeCAW5G
in reply to: jrreid

Thanks for your feedback,

Once I did the "reload" one time. Everything is fine from now on. I can open the dxf with the "open" button and it's fine. On my side, I can reproduce the issue just by moving my Sample folder somewhere else (Desktop for example) or just rename the folder. 

 

Look like when we reload there's something cached. 

 

I will give it a try by converting it as a Dwg. I know how to handle that issue but I automatically generate orthophoto and deliver the dxf to my clients. Often they comeback to me complaining they can't open the dxf properly (reload required). I'm pretty sure the error doesn't come from my dxf creation, but just wanted to confirm and find a solution to use relative xref.

 

I will take a look to move this thread inside an "error" / "programming" forum.

 

Thanks

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report