acedSSGet

作者: 王姚 | 来源:发表于2018-04-10 15:44 被阅读0次

    最简单的典型用法

    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<AcDbObject> 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("<OR"),
        AcDb::kDxfOperator, _T("<AND"),
        RTDXF0, _T("CIRCLE"),
        AcDb::kDxfLayerName, _T("ABC"),
        AcDb::kDxfOperator, _T("AND>"),
        AcDb::kDxfOperator, _T("<AND"),
        RTDXF0, _T("LINE"),
        AcDb::kDxfColor, 1,
        AcDb::kDxfOperator, _T("AND>"),
        AcDb::kDxfOperator, _T("OR>"),
        0);
    int ret = acedSSGet(NULL, NULL, NULL, rbFilter, ss);
    if (RTNORM == ret)
    {
        ......
    }
    

    相关文章

      网友评论

          本文标题:acedSSGet

          本文链接:https://www.haomeiwen.com/subject/rnlnhftx.html