Offset of the real entity in ARX

Source: Internet
Author: User

Static acdbobjectid offsetenty (const Achar * blkname, acdbobjectid entid, double ofsvalue, acdbdatabase * PDB = crtentity: ppurdb );
//! (Special Handling of Multiline)

Acdbobjectid editentity: offsetenty (const Achar * blkname, acdbobjectid entid, double ofsvalue, acdbdatabase * PDB)
{
Acdbentity * pent;
Acdbcurve * pcurv;
Acdbvoidptrarray offcurvs;
Acdbblocktable * pblktable;
Acdbblocktablerecord * pblktablerecord;
Errorstatus es;
/* ACAD: errorstatus es ;*/
Acdbobjectid objctid;
Es = acdbopenobject (pent, entid, ACDB: kforread );
If (pcurv = acdbcurve: Cast (pent) = NULL ){
Pent-> close ();
Return NULL;
}
Es = pcurv-> getoffsetcurves (ofsvalue, offcurvs );
If (es! = ACAD: Eok ){
Pent-> close ();
/* Acedalert ("An error occurred while setting the offset! ");*/
Return acdbobjectid: knull;
}
Pent-> close ();
If (! Offcurvs. isempty ()){
PDB-> getblocktable (pblktable, ACDB: kforread );
Pblktable-> getat (blkname, pblktablerecord, ACDB: kforwrite );
Pblktable-> close ();
For (INT I = 0; I <offcurvs. Length (); I ++ ){
Pent = (acdbentity *) offcurvs. at (I );
Pblktablerecord-> appendacdbentity (objctid, pent );
}
Pent-> close ();
Pblktablerecord-> close ();
Return objctid;
}
Else {
Return acdbobjectid: knull;
}
}

Offset of the real entity in ARX

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.