[cad-linux-dev] Re: persistent ID's with dwg/dxf

  • From: Eric Wilhelm <ewilhelm@xxxxxxxxxxxxx>
  • To: CAD linux development <cad-linux-dev@xxxxxxxxxxxxx>
  • Date: Mon, 11 Oct 2004 09:52:09 -0500

# The following was supposedly scribed by
# Bruno Postle
# on Monday 11 October 2004 01:59 am:

>> In digging through the dxf spec, it looks like each entity does
>> indeed have a persistent identifier (code 5: entity handle.)
>
>Hmm, "Text string of up to 16 hexadecimal digits" according to the
>spec. =A0It's a shame that it isn't a bit more flexible, though it
>should definitely be used to construct the entity filename when
>importing dxf/dwg.

Well, we could certainly use the integer form to be consistent with=20
filenames.

Additionally, there is the $HANDSEED header variable, which contains=20
the "next available handle".  This seems to typically start at 0x49=20
(at least with acad2000.)  I've been considering some new variables=20
for the "./drawing" file, and the "next_id" attribute was one of=20
them.

Of course, this opens some holes where we want to merge a couple of=20
drawings into one rhizopod hub, but the rhizopod_unstream program=20
could have options to handle that (e.g. checking for the next_id as=20
it goes (which brings up some interesting issues about concurrency=20
and locking again, but that's something for another day.))

=2D-Eric
=2D-=20
"Matter will be damaged in direct proportion to its value."
                                        --Murphy's Constant

Other related posts: