直接修改对象的DXF组码对应的值

ads_name e1, e2;
struct resbuf *ed, *cb;

if (acdbEntNext(NULL, e1) != RTNORM) {
acutPrintf(“\nNo entities found. Empty drawing.”);
return BAD;
}

acdbEntNext(e1, e2);

if ((ed = acdbEntGet(e2)) != NULL) {
for (cb = ed; cb != NULL; cb = cb->rbnext)

if (cb->restype == 10) { // Start point DXF code
cb->resval.rpoint[X] = 1.0;// Change coordinates.
cb->resval.rpoint[Y] = 2.0;

if (acdbEntMod(ed) != RTNORM) { // Move vertex.
acutPrintf(“\nBad vertex modification.”);
acutRelRb(ed);
return BAD;
} else {
acdbEntUpd(e1); // Regen the polyline.
acutRelRb(ed);
return GOOD; // Indicate success.
}
}
acutRelRb(ed);
}
return BAD; // Indicate failure.

此条目发表在ObjectArx分类目录,贴了, 标签。将固定链接加入收藏夹。

发表评论