Skip to content
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

Define AutoCAD release versions in include/dwg.h #870

Open
michal-josef-spacek opened this issue Nov 24, 2023 · 26 comments
Open

Define AutoCAD release versions in include/dwg.h #870

michal-josef-spacek opened this issue Nov 24, 2023 · 26 comments
Assignees
Labels
enhancement New feature or request questionable

Comments

@michal-josef-spacek
Copy link
Contributor

We have a situation, when we have DWG_VERSION_TYPE definitions in include/dwg.h, but this is related to DWG file, not to AutoCAD release.

Intent behind this is, that we need to define AutoCAD version and set defaults related to AutoCAD version.
e.g.
We have AutoCAD R_13 and AutoCAD R_2000. Boths could encode DWG file to AC1012 version.
But result is different e.g. in case of sections. This is common problem.
AutoCAD R_13:

num_sections: 3 [RL]
num_sections => 3
section[0].number:         0 [RC] AcDb:Header
section[0].address:       70 [RL]
section[0].size:         454 [RL]
section[1].number:         1 [RC] AcDb:Classes
section[1].address:      524 [RL]
section[1].size:          38 [RL]
section[2].number:         2 [RC] AcDb:Handles
section[2].address:     3977 [RL]
section[2].size:          79 [RL]
crc: A24C [RSx] from 0-52
         HEADER (end):      70

AutoCAD R_2000:

num_sections: 5 [RL]
num_sections => 5
section[0].number:         0 [RC] AcDb:Header
section[0].address:    18207 [RL]
section[0].size:         484 [RL]
section[1].number:         1 [RC] AcDb:Classes
section[1].address:    18691 [RL]
section[1].size:         475 [RL]
section[2].number:         2 [RC] AcDb:Handles
section[2].address:    25375 [RL]
section[2].size:         273 [RL]
section[3].number:         3 [RC] AcDb:ObjFreeSpace
section[3].address:    25648 [RL]
section[3].size:          53 [RL]
section[4].number:         4 [RC] AcDb:Template
section[4].address:    25847 [RL]
section[4].size:           4 [RL]
crc: DA60 [RSx] from 0-70
         HEADER (end):      88
@michal-josef-spacek michal-josef-spacek self-assigned this Nov 24, 2023
@michal-josef-spacek
Copy link
Contributor Author

michal-josef-spacek commented Nov 24, 2023

I have prepared part of commit: michal-josef-spacek@45bc47e

I am looking for blank.DWG files from some AutoCAD releases:

  • AutoCAD Release 2000
  • AutoCAD Release 2000i
  • AutoCAD Release 2002
  • AutoCAD Release 2002 SP1
  • AutoCAD Release 2004
  • AutoCAD Release 2004 SP1a
  • AutoCAD Release 2005
  • AutoCAD Release 2005 SP1
  • AutoCAD Release 2006
  • AutoCAD Release 2006 SP1
  • AutoCAD Release 2007
  • AutoCAD Release 2007 SP1
  • AutoCAD Release 2008
  • AutoCAD Release 2009
  • AutoCAD Release 2010
  • AutoCAD Release 2011
  • AutoCAD Release 2012
  • AutoCAD Release 2013
  • AutoCAD Release 2014
  • AutoCAD Release 2015
  • AutoCAD Release 2016
  • AutoCAD Release 2017
  • AutoCAD Release 2018
  • AutoCAD Release 2019
  • AutoCAD Release 2020
  • AutoCAD Release 2021
  • AutoCAD Release 2022
  • AutoCAD Release 2023
    Or other, if exists.

When you could help me, please send DWG file and release from which was saved. (Open AutoCAD and save)

@rurban
Copy link
Contributor

rurban commented Nov 24, 2023

I"m sorry, I don't have a single AutoCAD anymore :) It died with my mac

@turtle0x1
Copy link

I can probably help with the last 4 versions if need be, just empty DWG files?

Be happy to pop them over to ruban in email if it would help?

@michal-josef-spacek
Copy link
Contributor Author

@turtle0x1 I will be happy. Only save the blank DWG file, archive it (zip, rar, gzip), and push to this ticket as an attachment.

@michal-josef-spacek michal-josef-spacek added the enhancement New feature or request label Nov 24, 2023
@turtle0x1
Copy link

Have abit of concern posting them publicly, not sure on the legal implications? (These are work licenses, and I have to assume there is some identifier in the dwgs)

@michal-josef-spacek
Copy link
Contributor Author

@turtle0x1 You could send it to me ([email protected])

btw: This is probably a question to @rurban . I don't know about any license identification in the DWG file.

@rurban
Copy link
Contributor

rurban commented Nov 25, 2023

The license not, but username and ID yes

@michal-josef-spacek
Copy link
Contributor Author

michal-josef-spacek commented Nov 25, 2023

The license not, but username and ID yes

AcDb:Header:

  • FINGERPRINTGUID: "{254D4028-7034-9B4F-923B-5FE8735C027C}" [TU 1]
  • VERSIONGUID: "{FC10ADCE-D03D-5B4D-B6A7-B25A1C6025A6}" [TU 1]

AcDb:SummaryInfo:

  • LASTSAVEDBY: "Joshua" [TU 1]

Do you mean this?

@rurban
Copy link
Contributor

rurban commented Nov 26, 2023

Exactly, plus the Security section

@rurban
Copy link
Contributor

rurban commented Nov 27, 2023

We already have AUTOCAD_VERSION as our R_ release enums. But the extra table would be good to match it to the numeric dwg_version and maint_versions.

@michal-josef-spacek
Copy link
Contributor Author

We already have AUTOCAD_VERSION as our R_ release enums. But the extra table would be good to match it to the numeric dwg_version and maint_versions.

Yes, but this is not used as AUTOCAD_VERSION, but as DWG version.

@timoria21
Copy link

I am looking for blank.DWG files from some AutoCAD releases:

Would some files written by OpenDesign SDK help in this? I can write:

AC1012 R13
AC1014 R14
AC1015 R2000
AC1018 R2004
AC1021 R2007
AC1024 R2010
AC1027 R2013
AC1032 R2018

@michal-josef-spacek
Copy link
Contributor Author

Would some files written by OpenDesign SDK help in this? I can write:

I am definitely interested in how different SW saves the DWG file.

@timoria21
Copy link

Here you go Michal:

blank_ODA.zip

@michal-josef-spacek
Copy link
Contributor Author

michal-josef-spacek commented Nov 29, 2023

@timoria21 Thank you very much.
Do you have version of SDK or app which is saving this?

There is:

dwg_version: 0x21 [RC 0]
maint_version: 0x37 [RC 0]

This is definition of application, which saves DWG file. This info is same in all DWG files presented.

@rurban
Copy link
Contributor

rurban commented Nov 30, 2023

FYI: oda only discriminates on the dwg_version (only sometimes on the maint_version) and with class objects only on the class_version. Whilst we map the AC10xx magic to our own release numbers. But I have never seen a conflict so far

@timoria21
Copy link

@michal-josef-spacek This is plain ODA SDK DWG output

@rurban
Copy link
Contributor

rurban commented Nov 30, 2023

See, that's why we use the AC10xx magic, and not the dwg_version, which is just the version with which this file was created, and not with which version it was stored.

@michal-josef-spacek
Copy link
Contributor Author

Added AutoCAD 2018 and 2023, commit updated

@michal-josef-spacek
Copy link
Contributor Author

Added AutoCAD 2013, commit updated

@michal-josef-spacek
Copy link
Contributor Author

Added AutoCAD 2006 and 2006 SP1, commit updated.

New information, Service Pack has updated the maintenance version.

@michal-josef-spacek
Copy link
Contributor Author

Added AutoCAD 2004, 2004 SP1a, and 2007, commit updated

@rurban
Copy link
Contributor

rurban commented Feb 11, 2024

There is also the problem with the new VERSION checks, which could be a bit simplified to check the dwg_version, not the magic header version. ODA does only check this dwg_version.

I really want to have only R_2000 - R_2002 being 0x17, R-2004a - R_2004c being 0x18 and so on. They did bump the dwg_version for each major dwg release, but it would be still only two versions to check.

That's your @michal-josef-spacek add_autocad_version branch, right?

@michal-josef-spacek
Copy link
Contributor Author

That's your @michal-josef-spacek add_autocad_version branch, right?

Yes, that's mine..

rurban added a commit that referenced this issue Feb 11, 2024
to simplify the version checks.
same dwg versions == release version numerically
See GH #870
@michal-josef-spacek
Copy link
Contributor Author

I am for merging and working on it.

@rurban
Copy link
Contributor

rurban commented Feb 11, 2024

It doesn't pass the checks yet

rurban added a commit that referenced this issue Feb 15, 2024
to simplify the version checks.
same dwg versions == release version numerically
See GH #870
rurban added a commit that referenced this issue Feb 20, 2024
to simplify the version checks.
same dwg versions == release version numerically
See GH #870
rurban added a commit that referenced this issue Feb 21, 2024
to simplify the version checks.
same dwg versions == release version numerically
See GH #870
rurban added a commit that referenced this issue Feb 26, 2024
to simplify the version checks.
same dwg versions == release version numerically
See GH #870
rurban added a commit that referenced this issue Feb 26, 2024
to simplify the version checks.
same dwg versions == release version numerically
See GH #870
rurban added a commit that referenced this issue Feb 26, 2024
to simplify the version checks.
same dwg versions == release version numerically
See GH #870
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request questionable
Projects
None yet
Development

No branches or pull requests

4 participants