Comments (8)
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
from ezdxf.
I saw $PROJECTNAME='' is the default in my template files, I will add a HOWTO section for this problem with existing DXF files.
from ezdxf.
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.
from ezdxf.
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.
from ezdxf.
Thank you, I will add this information to the howto section.
from ezdxf.
Guys, this issue is still persistent in ACAD 2021.
How can be solved. Thanks
from ezdxf.
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.
from ezdxf.
@luzader Thank you!
If you don't mind, I'll add your tips to the HowTo section.
from ezdxf.
Related Issues (20)
- shx files are not loaded when configured in support_dirs config in ./ezdxf.ini HOT 1
- Corrupt Font Causes Appl to Crash (fonttools then ezdxf) HOT 1
- [ODA File Converter] Exec format error even though set a+x HOT 2
- ACAD_PROXY_ENTITY creates extra hatch with ezdxf view HOT 2
- Invalid export of version- and lock_position tags in ATTDEF and ATTRIB HOT 3
- A few regressions with Python 3.12 HOT 2
- Get some coordinates like this "(0, 0, 0)" when converting INSERT type HOT 12
- Test failures with Cython 3 HOT 2
- Default font "Arial.ttf" not found on macOS HOT 6
- Approach for create assembly drawing from component drawings HOT 1
- Ezdxf can't load fonts when using pytest HOT 4
- Building font manager cache fails with FileExistsError in Windows HOT 9
- MIN_HATCH_LINE_DISTANCE too large for certain DXF files HOT 2
- "\M+5D7DF\M+5CFDF\M+5BCDC" is invalid value for layer name HOT 7
- Extrusion attribute not read if extrusion.x (210) is not present HOT 1
- import of ezdxf failed in Windows x64, python 3.8 HOT 2
- Drawing problem on Chinese text HOT 18
- Doc search failing because of undefined jQuery reference HOT 2
- There's some issues at drawing hatch. HOT 3
- Error in matplotlib img export of nested polylines in 1.1.X HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ezdxf.