haplokuon / netDxf

.net dxf Reader-Writer
MIT License
986 stars 400 forks source link

Specifications of the handle #295

Open kyosukeSakurai opened 3 years ago

kyosukeSakurai commented 3 years ago

Has the latest netDxf changed the specifications for adding handles for dimensions and annotations? When the data of multiple Dxf files are combined into one Dxf file, the handles of dimensions and annotations are newly added, but the handles given in the past version and the latest version are different.

Is the handle inconsistent with past versions? Please tell me the specifications of the handle.

haplokuon commented 3 years ago

The handle is a unique identifier that AutoCad uses to reference dependencies between different the objects of the document: entities, table objects, blocks,... A handle is no more than a counter in hexadecimal number. Every time an object is added to a document a handle is generated, it is not important what handle is given for new objects, what is important is that, once given, that handle is unique to that object and it will be kept between loads.

When an empty document is created with netDxf several handles are generated for the default objects and they will always be the same, but, if for some reason, I need to make modifications to the document, yes, it is possible that between version the initial handles for the default object may change. But, as I said, the initial handle value is not important as long as its values is kept during the lifetime of the document.