acedssget F 方式

ads_point p1;
ads_point p2;
acedGetPoint(NULL, _T(" 插入第一点"), p1);
acedGetPoint(p1, _T(" 插入第二点"), p2);
//通过亮点来获取选中实体
ads_name ssName;
resbuf *pRb = acutBuildList(RTPOINT, p1, RTPOINT, p2, 0);
acedSSGet(_T("F"),pRb, NULL, NULL, ssName);
acutRelRb(pRb);
//遍历选择集
long len = 0;
acedSSLength(ssName, &len);

for (long index = 0; index < len;index++)
{
ads_name ent;
AcDbObjectId pId;
acedSSName(ssName, index, ent);

acdbGetObjectId(pId, ent);
if (!pId.isValid())
{
continue;
}
pidArr.append(pId);
}
acedSSFree(ssName);

原文地址:https://www.cnblogs.com/xzh1993/p/5605930.html