ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Block is Local?

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
209 Views, 6 Replies

Block is Local?

In a BlockTableRecord iterator, I want to identify only blocks LOCAL (not
xref'd in)

if(!pBTR->isLayout() && !pBTR->isFromExternalReference())

I am getting all blocks, i.e.:

blk1
blk2
blk3
xref1|blk1
xref1|blk2
xref2|blk1
xref2|blk2

I need to ignore the xref'd | blocks... do I have to resort to string
checking, or is there a function I am ignoring?

Thanks,
MS
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

Are these, by any chance, overlays rather than xrefs? If so, then you'll
also need to check

!pBTR->isFromOverlayReference()

"Martin Schmid" wrote in message
news:BA5AA8D806F0F6B65A93DC42F05E66D3@in.WebX.maYIadrTaRb...
> In a BlockTableRecord iterator, I want to identify only blocks LOCAL (not
> xref'd in)
>
> if(!pBTR->isLayout() && !pBTR->isFromExternalReference())
>
> I am getting all blocks, i.e.:
>
> blk1
> blk2
> blk3
> xref1|blk1
> xref1|blk2
> xref2|blk1
> xref2|blk2
>
> I need to ignore the xref'd | blocks... do I have to resort to string
> checking, or is there a function I am ignoring?
>
> Thanks,
> MS
>
>
Message 3 of 7
Anonymous
in reply to: Anonymous

the descriptions (and results) of isFromOverlayReference() and
isFromExternalReference() indicate to me that this just tests the 'parent'
of the blocks, namely the xrefs themselves... they aren't checking if the
blockTR is inside the xref's BTR.

Thanks,
MS


"Art Cooney" wrote in message
news:B4ABE37EF012C7769AA299AC246040CE@in.WebX.maYIadrTaRb...
> Are these, by any chance, overlays rather than xrefs? If so, then you'll
> also need to check
>
> !pBTR->isFromOverlayReference()
>
> "Martin Schmid" wrote in message
> news:BA5AA8D806F0F6B65A93DC42F05E66D3@in.WebX.maYIadrTaRb...
> > In a BlockTableRecord iterator, I want to identify only blocks LOCAL
(not
> > xref'd in)
> >
> > if(!pBTR->isLayout() && !pBTR->isFromExternalReference())
> >
> > I am getting all blocks, i.e.:
> >
> > blk1
> > blk2
> > blk3
> > xref1|blk1
> > xref1|blk2
> > xref2|blk1
> > xref2|blk2
> >
> > I need to ignore the xref'd | blocks... do I have to resort to string
> > checking, or is there a function I am ignoring?
> >
> > Thanks,
> > MS
> >
> >
>
>
Message 4 of 7
Anonymous
in reply to: Anonymous

This is a most confusing thing - isn't overlay/attach just a property of an
xref? The name isFromExternalReference() implies that you are determining
whether a BTR is a block or an external reference. It was my understanding
that an "overlay" is just a type of external reference. Is that not
correct?


"Art Cooney" wrote in message
news:B4ABE37EF012C7769AA299AC246040CE@in.WebX.maYIadrTaRb...
> Are these, by any chance, overlays rather than xrefs? If so, then you'll
> also need to check
>
> !pBTR->isFromOverlayReference()
>
> "Martin Schmid" wrote in message
> news:BA5AA8D806F0F6B65A93DC42F05E66D3@in.WebX.maYIadrTaRb...
> > In a BlockTableRecord iterator, I want to identify only blocks LOCAL
(not
> > xref'd in)
> >
> > if(!pBTR->isLayout() && !pBTR->isFromExternalReference())
> >
> > I am getting all blocks, i.e.:
> >
> > blk1
> > blk2
> > blk3
> > xref1|blk1
> > xref1|blk2
> > xref2|blk1
> > xref2|blk2
> >
> > I need to ignore the xref'd | blocks... do I have to resort to string
> > checking, or is there a function I am ignoring?
> >
> > Thanks,
> > MS
> >
> >
>
>
Message 5 of 7
Anonymous
in reply to: Anonymous

that is what autocad seems to think.

"Jon Rizzo" wrote in message
news:EE587DFFFCA0CDD28FF656D737FD3259@in.WebX.maYIadrTaRb...
>
> This is a most confusing thing - isn't overlay/attach just a property of
an
> xref? The name isFromExternalReference() implies that you are determining
> whether a BTR is a block or an external reference. It was my
understanding
> that an "overlay" is just a type of external reference. Is that not
> correct?
>
>
> "Art Cooney" wrote in message
> news:B4ABE37EF012C7769AA299AC246040CE@in.WebX.maYIadrTaRb...
> > Are these, by any chance, overlays rather than xrefs? If so, then
you'll
> > also need to check
> >
> > !pBTR->isFromOverlayReference()
> >
> > "Martin Schmid" wrote in message
> > news:BA5AA8D806F0F6B65A93DC42F05E66D3@in.WebX.maYIadrTaRb...
> > > In a BlockTableRecord iterator, I want to identify only blocks LOCAL
> (not
> > > xref'd in)
> > >
> > > if(!pBTR->isLayout() && !pBTR->isFromExternalReference())
> > >
> > > I am getting all blocks, i.e.:
> > >
> > > blk1
> > > blk2
> > > blk3
> > > xref1|blk1
> > > xref1|blk2
> > > xref2|blk1
> > > xref2|blk2
> > >
> > > I need to ignore the xref'd | blocks... do I have to resort to string
> > > checking, or is there a function I am ignoring?
> > >
> > > Thanks,
> > > MS
> > >
> > >
> >
> >
>
>
Message 6 of 7
Anonymous
in reply to: Anonymous

Oh, so you want to determine BTRs that are part of an xref rather than the
actual xref BTR itself. Sorry, I didn't catch that before. You can use the
isDependent() method (which is at the AcDbSymbolTableRecord level) to tell
if any symbolTableRecord is part of an xref or not.


"Martin Schmid" wrote in message
news:DE605D45973B0BE708DEBA1604F1CEA8@in.WebX.maYIadrTaRb...
> the descriptions (and results) of isFromOverlayReference() and
> isFromExternalReference() indicate to me that this just tests the 'parent'
> of the blocks, namely the xrefs themselves... they aren't checking if the
> blockTR is inside the xref's BTR.
>
> Thanks,
> MS
>
>
> "Art Cooney" wrote in message
> news:B4ABE37EF012C7769AA299AC246040CE@in.WebX.maYIadrTaRb...
> > Are these, by any chance, overlays rather than xrefs? If so, then
you'll
> > also need to check
> >
> > !pBTR->isFromOverlayReference()
> >
> > "Martin Schmid" wrote in message
> > news:BA5AA8D806F0F6B65A93DC42F05E66D3@in.WebX.maYIadrTaRb...
> > > In a BlockTableRecord iterator, I want to identify only blocks LOCAL
> (not
> > > xref'd in)
> > >
> > > if(!pBTR->isLayout() && !pBTR->isFromExternalReference())
> > >
> > > I am getting all blocks, i.e.:
> > >
> > > blk1
> > > blk2
> > > blk3
> > > xref1|blk1
> > > xref1|blk2
> > > xref2|blk1
> > > xref2|blk2
> > >
> > > I need to ignore the xref'd | blocks... do I have to resort to string
> > > checking, or is there a function I am ignoring?
> > >
> > > Thanks,
> > > MS
> > >
> > >
> >
> >
>
>
Message 7 of 7
Anonymous
in reply to: Anonymous

That looks like it is it!

Thanks, Art... gotta check the parent classes sometimes.

MS

"Art Cooney" wrote in message
news:923B039EF72B0FF53FC60EEB2D0E2ABA@in.WebX.maYIadrTaRb...
> Oh, so you want to determine BTRs that are part of an xref rather than the
> actual xref BTR itself. Sorry, I didn't catch that before. You can use
the
> isDependent() method (which is at the AcDbSymbolTableRecord level) to tell
> if any symbolTableRecord is part of an xref or not.
>
>
> "Martin Schmid" wrote in message
> news:DE605D45973B0BE708DEBA1604F1CEA8@in.WebX.maYIadrTaRb...
> > the descriptions (and results) of isFromOverlayReference() and
> > isFromExternalReference() indicate to me that this just tests the
'parent'
> > of the blocks, namely the xrefs themselves... they aren't checking if
the
> > blockTR is inside the xref's BTR.
> >
> > Thanks,
> > MS
> >
> >
> > "Art Cooney" wrote in message
> > news:B4ABE37EF012C7769AA299AC246040CE@in.WebX.maYIadrTaRb...
> > > Are these, by any chance, overlays rather than xrefs? If so, then
> you'll
> > > also need to check
> > >
> > > !pBTR->isFromOverlayReference()
> > >
> > > "Martin Schmid" wrote in message
> > > news:BA5AA8D806F0F6B65A93DC42F05E66D3@in.WebX.maYIadrTaRb...
> > > > In a BlockTableRecord iterator, I want to identify only blocks LOCAL
> > (not
> > > > xref'd in)
> > > >
> > > > if(!pBTR->isLayout() && !pBTR->isFromExternalReference())
> > > >
> > > > I am getting all blocks, i.e.:
> > > >
> > > > blk1
> > > > blk2
> > > > blk3
> > > > xref1|blk1
> > > > xref1|blk2
> > > > xref2|blk1
> > > > xref2|blk2
> > > >
> > > > I need to ignore the xref'd | blocks... do I have to resort to
string
> > > > checking, or is there a function I am ignoring?
> > > >
> > > > Thanks,
> > > > MS
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost