Hi Daniel,
ads_name ss;
if( RTNORM != acedSSGet("P",NULL,NULL,NULL,ss))
{
if( RTNORM != acedSSGet(NULL,NULL,NULL,NULL,ss))
{
acDocManager->unlockDocument(acDocManager->curDocument());
return;
}
}
long nEnts;
acedSSLength(ss,&nEnts);
AcDbObjectIdArray entities(nEnts);
acutPrintf("\nFound %d Entities", nEnts);
double pRadius, y_value;
int rc;
ads_name en;
AcGePoint3d pt;
rc = acedEntSel("\nSelect circles: ", en, asDblArray(pt));
if (rc != RTNORM)
{
acutPrintf("\nNo entity selected...");
return;
}
AcDbObjectId eId, eId2;
acdbGetObjectId(eId, en);
AcDbObject *pDbObj;
AcDbCircle *pcircle;
AcGePoint3d *pCenter1 = new AcGePoint3d;
acdbOpenObject(pDbObj, eId, AcDb::kForRead);
AcDbCircle* pCircle = AcDbCircle::cast(pDbObj);
if(pCircle == NULL)
return;
if(pCircle == NULL)
return;
AcGePoint3d pCenter = pCircle->center();
y_value = pCenter.y;
pRadius = pCircle->radius();
acutPrintf("Selected object Y value %f\n", y_value);
acutPrintf("Selected object X value %f\n", pCenter);
This above code working fine. but it shows only one selected circles center. But i need to show multiple circles at a time. please help me to change the code for to show selected circles center point...
Thanks again...