erasing xdata in a Blockreference

erasing xdata in a Blockreference

Anonymous
Not applicable
320 Views
3 Replies
Message 1 of 4

erasing xdata in a Blockreference

Anonymous
Not applicable
Hello,

if I erase a AcDbBlockReference (with pBlockRef->erase()) that contains
Xdata , is the Data of the Xdata correctly removed from memory or do i have
to do some extra action for this ?

Thank you
Jörg
0 Likes
321 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
The erase() method doesn't remove anything from memory. All it does is
toggle a flag in the object that indicates whether or not the object is
erased.

"Jörg Kühne" wrote in message
news:1120CDFFB7EEAC6859D1DA15E36EE2DA@in.WebX.maYIadrTaRb...
> Hello,
>
> if I erase a AcDbBlockReference (with pBlockRef->erase()) that contains
> Xdata , is the Data of the Xdata correctly removed from memory or do i
have
> to do some extra action for this ?
>
> Thank you
> Jörg
>
>
>
>
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
Hello,

I asked the my question in a wrong way. What I mean is: If I want to delete
a Blockreference with xdata (similar to Acadcommand: _erase) can I do this
in the following usual way (minimal code without any errorchecking) ?:

acdbOpenObject(pObj,blkRefId,AcDb::kForWrite);
pObj->erase();
pObj->close();

or do I have to consider something because of the xdata ?

Regards Jörg

"Art Cooney" schrieb im Newsbeitrag
news:31E32BC7A54E7240FAC6EF550338FA74@in.WebX.maYIadrTaRb...
> The erase() method doesn't remove anything from memory. All it does is
> toggle a flag in the object that indicates whether or not the object is
> erased.
>
> "Jörg Kühne" wrote in message
> news:1120CDFFB7EEAC6859D1DA15E36EE2DA@in.WebX.maYIadrTaRb...
> > Hello,
> >
> > if I erase a AcDbBlockReference (with pBlockRef->erase()) that contains
> > Xdata , is the Data of the Xdata correctly removed from memory or do i
> have
> > to do some extra action for this ?
> >
> > Thank you
> > Jörg
> >
> >
> >
> >
> >
>
>
0 Likes
Message 4 of 4

Anonymous
Not applicable
The xdata goes with the object, so if you erase the object (via AutoCAD
command or the erase() method), the object's xdata is part of that erase
operation. When the drawing is then saved, the object and its xdata will
not be saved.

"Jörg Kühne" wrote in message
news:6BF5EF72197E9EC33061A6332B820990@in.WebX.maYIadrTaRb...
> Hello,
>
> I asked the my question in a wrong way. What I mean is: If I want to
delete
> a Blockreference with xdata (similar to Acadcommand: _erase) can I do this
> in the following usual way (minimal code without any errorchecking) ?:
>
> acdbOpenObject(pObj,blkRefId,AcDb::kForWrite);
> pObj->erase();
> pObj->close();
>
> or do I have to consider something because of the xdata ?
>
> Regards Jörg
>
> "Art Cooney" schrieb im Newsbeitrag
> news:31E32BC7A54E7240FAC6EF550338FA74@in.WebX.maYIadrTaRb...
> > The erase() method doesn't remove anything from memory. All it does is
> > toggle a flag in the object that indicates whether or not the object is
> > erased.
> >
> > "Jörg Kühne" wrote in message
> > news:1120CDFFB7EEAC6859D1DA15E36EE2DA@in.WebX.maYIadrTaRb...
> > > Hello,
> > >
> > > if I erase a AcDbBlockReference (with pBlockRef->erase()) that
contains
> > > Xdata , is the Data of the Xdata correctly removed from memory or do i
> > have
> > > to do some extra action for this ?
> > >
> > > Thank you
> > > Jörg
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
0 Likes