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

erasing xdata in a Blockreference

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
164 Views, 3 Replies

erasing xdata in a Blockreference

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
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

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
>
>
>
>
>
Message 3 of 4
Anonymous
in reply to: Anonymous

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
> >
> >
> >
> >
> >
>
>
Message 4 of 4
Anonymous
in reply to: Anonymous

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
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>

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

Post to forums  

Autodesk Design & Make Report

”Boost