Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Xref & Group Code 70

0 views
Skip to first unread message

Heebs

unread,
Feb 15, 1999, 3:00:00 AM2/15/99
to
I am trying to get a better understanding of xref's and the bit codes
required to filter them out. The 36, 40, & 44 were used in a program I
found in this newgroup. According to the author's comments, the codes were
used to filter out the DXF code numbers used to see if an entity was a
resolved xref. If I xref a drawing and check the Group code 70 it is 36,
therefore I can see why 36 works. I have also seen other people suggest to
use a logand with a 4 (0000 0100) to use as a filter.

If someone would be so kind as to answer a couple of questions I have I'm
sure many others will benefit.

----------

QUESTION 1: The 44 shown below seems to be redundant since the 36 filters
out bit 3 and bit 4 is filtered out by the 40. Is this the case?

QUESTION 2: Why does bit 6 have to be checked? Maybe question 3 will answer
this one.

QUESTION 3: Could someone elaborate a little bit on the meanings of bit 5
and bit 6.

-----------------

36 = 0 0 1 0 0 1 0 0
40 = 0 0 1 0 1 0 0 0
44 = 0 0 1 0 1 1 0 0


------------------
bit 1 - This is an anonymous block
bit 2 - This block has attribute definitions
bit 3 - This block is an external reference (xref)
bit 4 - This block is an xref overlay
bit 5 - This block is externally dependent. (?????????????)
bit 6 - This is a referenced external reference (????????????)


Thanks in advance…… Dave

Tony Tanzillo

unread,
Feb 15, 1999, 3:00:00 AM2/15/99
to
It depends on how you want to filter XREFS.

If you want *any* Xref, then just use
(eq 4 (logand 4 <flags>))

If you want only xrefs that are resolved, then
you can use (eq 36 (logand 36 <flags>)). If an
xref is resolved, then (logand 36 flags) will
return 36, or 4 if the xref is not resolved.

If you want only xrefs that are overlays then
you can use (eq 12 (logand 12 <flags>)). If
you want only resolved xrefs that are overlays,
then you can use (eq 44 (logand 44 <flags>))

The 5 (decimal 32) bit indicates if the XREF
(or externally-dependent block) is resolved.
If the xref/xblock is not resolved, this bit
is 0.

The 6 (decimal 64) bit should not be used, as
it is only valid when the drawing is loaded
and cannot be relied on once the database has
been modified.

--
/*********************************************************/
/* Tony Tanzillo Design Automation Consulting */
/* Programming & Customization for AutoCAD & Compatibles */
/* ----------------------------------------------------- */
/* tony.t...@worldnet.att.net */
/* http://ourworld.compuserve.com/homepages/tonyt */
/*********************************************************/

Heebs

unread,
Feb 15, 1999, 3:00:00 AM2/15/99
to
Tony,

Thank you for your reply. I do have a few questions to your response if you
don't mind.


>If you want only xrefs that are resolved, then
>you can use (eq 36 (logand 36 <flags>)). If an
>xref is resolved, then (logand 36 flags) will
>return 36, or 4 if the xref is not resolved.

I tried to find what a "resolved" means in regards to an xref but didn't
have any luck. If you could elaborate a bit on the meaning of a resolved
xref, I'd appreciate it.
-----------------

>If you want only xrefs that are overlays then
>you can use (eq 12 (logand 12 <flags>)). If
>you want only resolved xrefs that are overlays,
>then you can use (eq 44 (logand 44 <flags>))

A 12 (0000 1100) will set bits 3 and 4 to (1) . Does this mean that bit 3
will be checking to see if it is an external reference and bit 4 is checking
to see if it's an overlay?
bit 3 - My understanding is this block is an external reference (xref)
bit 4 - My understanding is this block is an xref overlay.

A 44 (0001 1100) sets bits 3,4,& 5 therefore my thinking is it's the same as
above along with checking to see if it's also externally dependent (whatever
that means).


bit 5 - This block is externally dependent.

------------------

>The 5 (decimal 32) bit indicates if the XREF
>(or externally-dependent block) is resolved.
>If the xref/xblock is not resolved, this bit
>is 0.

Maybe this is part of my confusion, my understanding is that bit 5 is equal
to 16 therefore a decimal 32 sets bit 6 and not bit 5. The following table
is the way I'm transposing the bits to decimal.

bit 1 = 0 or 1
bit 2 = 2 to 3 (with bit 1 set)
bit 3 = 4 to 7 (if bits 2 and 3 are set)
bit 4 = 8 to 15 ("" """ "")
bit 5 = 16 to 31 ("" "" "" "" "")
bit 6 = 32 to 63 ("" "" "" "" "" "" "")

and this table (I think came from one of your older posts)


bit 1 - This is an anonymous block
bit 2 - This block has attribute definitions
bit 3 - This block is an external reference (xref)
bit 4 - This block is an xref overlay

bit 5 - This block is externally dependent. (don't know what that means)
bit 6 - This is a referenced external reference (and I don't know what that
means)


Tony Tanzillo wrote in message <36C8AE24...@worldnet.att.net>...

Tony Tanzillo

unread,
Feb 15, 1999, 3:00:00 AM2/15/99
to
Heebs wrote:
>
> Tony,

>
>
> I tried to find what a "resolved" means in regards to
> an xref but didn't have any luck. If you could elaborate
> a bit on the meaning of a resolved xref, I'd appreciate it.

Resolved = loaded.

If the referenced .DWG file is not found, then
AutoCAD draws text in place of insertions of the
XREF, and it is 'unresolved'.

> Does this mean that bit 3 will be checking to see
> if it is an external reference and bit 4 is checking
> to see if it's an overlay?

Right.

> A 44 (0001 1100) sets bits 3,4,& 5 therefore my
> thinking is it's the same as above along with
> checking to see if it's also externally dependent
> (whatever that means).

If an XREF contains a block, the block appears in
the drawing that references the XREF, with the
XREF name and a "|" in front of the block name.
Externally-dependent means that the block is not
defined in the current drawing, it's defined in
an XREF that is inserted in the current drawing.


> Maybe this is part of my confusion, my understanding
> is that bit 5 is equal to 16 therefore a decimal 32
> sets bit 6 and not bit 5. The following table
> is the way I'm transposing the bits to decimal.
>

> and this table (I think came from one of your older posts)

No, it certainly didn't.

I don't like referring to bits by position, because
some people use base-0 and others (like you) use base
1, and that's why the AutoCAD help probably doesn't
do that either.

So:

Bit Decimal
-----------------------
0 1
1 2
2 4
3 8
4 16
5 32
6 64
7 128

The first bit above (bit 0) is your "bit 1" below.


> bit 1 - This is an anonymous block
> bit 2 - This block has attribute definitions
> bit 3 - This block is an external reference (xref)
> bit 4 - This block is an xref overlay
> bit 5 - This block is externally dependent. (don't know what that means)
> bit 6 - This is a referenced external reference (and I don't know what that

Heebs

unread,
Feb 15, 1999, 3:00:00 AM2/15/99
to
Tony,

>> and this table (I think came from one of your older posts)
>
>No, it certainly didn't.

I stand corrected! :-)
I thought you had written it but you were only responding to it (3/9/98)
As far as calling it bit 1 that certainly was my terminology which I
probably won't use in the future. :-)

Thanks a lot for the help!!!


0 new messages