天气与日历 切换到窄版

 找回密码
 立即注册
中国膜结构网
十大进口膜材评选 十大国产膜材评选 十大膜结构设计评选 十大膜结构公司评选
查看: 116|回复: 0

创建匿名组

[复制链接]
  • TA的每日心情
    开心
    7 小时前
  • 签到天数: 20 天

    [LV.4]偶尔看看III

    115

    主题

    11

    回帖

    1393

    积分

    管理员

    积分
    1393
    QQ
    发表于 2024-6-5 07:54:04 | 显示全部楼层 |阅读模式
    1. int acdbAddAnonGrpRet2Lsp()
    2. {
    3. // TODO: Implement the command
    4. resbuf *pArg =acedGetArgs ();
    5. struct resbuf *startRb = NULL;
    6. AcDbGroup *pGroup = new AcDbGroup();
    7. AcDbObjectId grpId;
    8. AcDbDictionary *pGroupDict;
    9. Acad::ErrorStatus es;
    10. AcApDocument *curDoc;
    11. //get the group dictionary
    12. AcDbDatabase *pDb = acdbHostApplicationServices()->
    13.   workingDatabase();
    14. if (Acad::eOk == (es = acDocManager->lockDocument(
    15.   curDoc=acDocManager->curDocument())))
    16.   es = pDb->getGroupDictionary(pGroupDict,AcDb::kForWrite);
    17. if (es != Acad::eOk)
    18.   return es;
    19. //make an anonymous entry
    20. if ((es = pGroupDict->setAt(L"*", pGroup, grpId)) ==
    21.   Acad::eOk) {
    22.   //retrieve its name char *pNam;
    23.   pGroup->close();
    24. }
    25. // create a resbuf with our ObjectID in it
    26. struct resbuf *newRb = acutBuildList (RTLONG, grpId, RTNONE);
    27. // if ok
    28. if (newRb != NULL) {
    29.   // if this is the first time we've done this
    30.   if (startRb == NULL) {
    31.    // then set this as the start
    32.    startRb = newRb;
    33.   }
    34.   // otherwise add it to the end of our list
    35.   else {
    36.    // create a pointer to the beginning of our resbuf list
    37.    struct resbuf *ptr = startRb;
    38.    // find the end of our list
    39.    while (ptr->rbnext != NULL)
    40.     ptr = ptr->rbnext;
    41.    // now attach our newly create resbuf to the end
    42.    ptr->rbnext = newRb;
    43.   }
    44. }
    45. pGroupDict->close();
    46. acDocManager->unlockDocument(curDoc);
    47. acedRetList(startRb);
    48. acutRelRb(startRb);
    49. return (RTNORM);
    50. }
    复制代码

     

     

     

     

    创建匿名组
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|Archiver|中国膜结构网|中国膜结构协会|进口膜材|国产膜材|ETFE|PVDF|PTFE|设计|施工|安装|车棚|看台|污水池|中国膜结构网_中国空间膜结构协会

    GMT+8, 2024-11-5 12:31 , Processed in 0.162026 second(s), 27 queries .

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

    快速回复 返回顶部 返回列表