zoukankan      html  css  js  c++  java
  • 选择指定图层上的所有实体

    Acad::ErrorStatus selectEntityInLayer(const char* nLayerName,AcDbObjectIdArray& nIDs)
    {
     Acad::ErrorStatus es = Acad::eOk;
    
     ads_name ents;
     struct resbuf *rb;
     rb=acutNewRb(AcDb::kDxfLayerName);
     rb->restype=8;
     rb->resval.rstring=(char*)nLayerName;
     rb->rbnext=NULL;
     acedSSGet("X",NULL,NULL,rb,ents);
     long entNums=0;
     acedSSLength(ents,&entNums);
     if (entNums == 0)
      es = Acad::eInvalidInput;
     else
     {
      for (long a = 0; a < entNums ; a ++)
      {
       AcDbObjectId  objId;
       ads_name      ent;
       acedSSName(ents,a,ent);
       acdbGetObjectId(objId, ent);
       nIDs.append(objId);
      }
     }
     acedSSFree(ents);
     acutRelRb(rb);
    
     return es;
    }
  • 相关阅读:
    支付宝支付
    django之contenttype
    vue 项目搭建 及基础介绍
    redis续
    1012
    1009
    灾后重建
    FLOYD判圈
    1007
    1006
  • 原文地址:https://www.cnblogs.com/nightnine/p/5344044.html
Copyright © 2011-2022 走看看