acedSSGet

最简单的典型用法

ads_name ss = { 0 };
int ret = acedSSGet(NULL, NULL, NULL, NULL, ss);
if (RTNORM == ret)
{
    long len = 0;
    acedSSLength(ss, &len);
    for (long i = 0L; i < len; ++i)
    {
        ads_name ename = { 0 };
        acedSSName(ss, i, ename);
        AcDbObjectId id = AcDbObjectId::kNull;
        acdbGetObjectId(id, ename);
        if (id.isNull())
        {
            continue;
        }

        AcDbObjectPointer dbobjPtr(id, AcDb::kForRead);
        if (Acad::eOk == dbobjPtr.openStatus())
        {
            //acutPrintf(_T("\n%s"), dbobjPtr->isA()->name());
            ......
        }
    }

    acedSSFree(ss);
}

过滤器

在图层"ABC"上的圆 或 红色的直线

ads_name ss;
struct resbuf* rbFilter;
rbFilter = acutBuildList(
    AcDb::kDxfOperator, _T(""),
    AcDb::kDxfOperator, _T(""),
    AcDb::kDxfOperator, _T("OR>"),
    0);
int ret = acedSSGet(NULL, NULL, NULL, rbFilter, ss);
if (RTNORM == ret)
{
    ......
}

你可能感兴趣的:(acedSSGet)