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