Community
static void MyGroupMyCommand() {
ads_name ss;
resbuf* rbList = acutBuildList(RTDXF0, _T("LWPOLYLINE,ARC,SPLINE"), RTNONE);
int stat = acedSSGet(NULL, NULL, NULL, rbList, ss);
if (rbList)
acutRelRb(rbList);
if (RTNORM != stat)
return;
Adesk::Int32 nSSLength = 0;
acedSSLength(ss, &nSSLength);
AcDbEntity *pEnt = NULL;
for (Adesk::Int32 i = 0; i < nSSLength; i++)
{
ads_name ent;
acedSSName(ss, i, ent);
AcDbObjectId objId;
acdbGetObjectId(objId, ent);
Acad::ErrorStatus es = acdbOpenObject(pEnt, objId, AcDb::kForRead);
if (es != Acad::eOk)
return;
if (pEnt->isKindOf(AcDbCurve::desc()))
{
double startParam, endParam;
AcGePoint3d Ptstart,Ptend;
AcDbCurve *pCurve = AcDbCurve::cast(pEnt);
pCurve->reverseCurve();
pCurve->close();
}
pEnt->close();
}
acedSSFree(ss);
}
Solved! Go to Solution.
Solved by tbrammer. Go to Solution.
A formulated question would be helpful 😉.
However: You only opened the curve kForRead. So you can't modify it with reverseCurve().
Use es = curve->upgradeOpen() and check that es==Acad:.eOk.
Can't find what you're looking for? Ask the community or share your knowledge.