GithubHelp home page GithubHelp logo

Comments (8)

mozman avatar mozman commented on July 20, 2024

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.

mozman avatar mozman commented on July 20, 2024

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.

mozman avatar mozman commented on July 20, 2024

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.

worlds6440 avatar worlds6440 commented on July 20, 2024

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.

mozman avatar mozman commented on July 20, 2024

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

from ezdxf.

ardamaks avatar ardamaks commented on July 20, 2024

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

from ezdxf.

luzader avatar luzader commented on July 20, 2024

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.

mozman avatar mozman commented on July 20, 2024

@luzader Thank you!

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

from ezdxf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.