AcDbObjectId FindLine(AcGePoint3d pt)
{
AcDbObjectId yLineId;
ads_point ptUnder = {pt.x, pt.y, pt.z};
ads_name ss;
int res;
resbuf* rb=acutBuildList(RTDXF0, _T(“LINE”), 0); //필터
double BoxScale=0.0;
BoxScale = Utils::getPickBox(); //pickbox 크기
AcGePoint3d p1, p2;
p1.x = pt.x – BoxScale*0.5;
p1.y = pt.y – BoxScale*0.5;
p2.x = pt.x + BoxScale*0.5;
p2.y = pt.y + BoxScale*0.5;
if (RTNORM == (acedSSGet(_T(“C”),&p1,&p2 , rb, ss)))
{
AcDbObjectIdArray ids;
Utils::ss2Array(ss, ids);
while(ids.length()){
AcDbObjectPointer<AcDbLine> pLine(ids.first(), AcDb::kForRead);
ids.removeFirst();
if(pLine.openStatus()== Acad::eOk){
if(pLine->colorIndex() == 2)
{
yLineId = pLine->objectId();
}
pLine->close();
}
}//end-while
}//end-ssget
return yLineId;
}