Giter Site home page Giter Site logo

Comments (6)

ognjen-petrovic avatar ognjen-petrovic commented on July 17, 2024

Hi Jonathan,

I do not have access to Revit :( , it would be great if you can do that.

I used this documents:
https://www.autodesk.com/techpubs/autocad/acadr14/dxf/header_section_al_u05_c.htm
https://www.autodesk.com/techpubs/autocad/acad2000/dxf/header_section_group_codes_dxf_02.htm

from js-dxf.

jonathan-buildrz avatar jonathan-buildrz commented on July 17, 2024

I finally had time to dig into this problem and now understand a bit of what is happening.

If what this post says about autocad also applies to revit :
https://forums.autodesk.com/t5/autocad-forum/minimum-dxf-code-to-display-entities-with-true-color/m-p/8856675/highlight/true#M983376
Then without a version number, revit may assume the dxf file is following the R12 format.
The specification you linked to is for R14/2000.
According to this post :
https://forums.autodesk.com/t5/autocad-forum/minimum-dxf-code-to-display-entities-with-true-color/m-p/8871972/highlight/true#M984356
Starting from the R13, a lot more information are needed in the files.
I made a mistake when implementing true color in the lib because this feature shouldn't be available before version 2004. (maybe this should be reverted ?)
I also had spaces in the name of my layers, which revit doesn't seem to like. This is strange, because if I save the file as a R12 dxf in librecad, it keeps the spaces but revit accepts the file, so it may be something else...

So revit seems to be way stricter in what it accepts compared to librecad.
Sadly, I don't have the time to modify the lib so that it produces a strict R14 DXF (the spec you used).
However, I found a nice page on the docs of the (python) ezdxf package which explains what a minimum dxf file should contain for R12 and R14 :
https://ezdxf.readthedocs.io/en/master/dxfinternals/filestructure.html
If anybody has more time than me...

from js-dxf.

ognjen-petrovic avatar ognjen-petrovic commented on July 17, 2024

Hi Jonathan,

Great thanks for your research and explanation.
I will try to add that soon.

Ognjen

from js-dxf.

yowzadave avatar yowzadave commented on July 17, 2024

Are there any R13-R14-specific properties that this library is using? When I import a file generated by this library into AutoCAD, it notifies me: "Opening a Release 12 DXF file," and seems to display correctly. Perhaps the easiest approach would be to just explicitly define it as an R12 output in the header:

9
$ACADVER
1
AC1009

from js-dxf.

ognjen-petrovic avatar ognjen-petrovic commented on July 17, 2024

Hi,

As per Jonathan's post above, yes, there is at least true color feature that is not available in R12.

You could try set version and check if that helps. To set a version use header method:

let d = new Drawing();
d.header('ACADVER', [[1, 'AC1009']]);

from js-dxf.

kriffe avatar kriffe commented on July 17, 2024

This should be resolved with a successful implementation of header in #33

from js-dxf.

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.