明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1916|回复: 0

使用acedSSNameX后无法获得选择点

[复制链接]
发表于 2007-11-7 09:39:00 | 显示全部楼层 |阅读模式

int extractEntityInfo(struct resbuf *rb,
                      int&      sel_method,
                      ads_name  ename,
                      ads_name  subname,
                      short& marker,
                      AcGePoint3d&    pickpnt,
                      AcGeVector3d&   pickvec,
                      // AcGeMatrix3d& xform,
                      struct resbuf*& containers)
{
    if ( rb == NULL || rb->restype != RTLB )
    {
        assert(0);
        return 0;
    }
   
    // Get the selection method.
     rb = rb->rbnext;  

    sel_method = rb->resval.rint;
   acutPrintf(_T("method %d"),sel_method);
    // Get the first ename (could be either the actual entity name or subentity name).
      rb = rb->rbnext;  // Bump up to the first name, always after sel method.
    ename[0] = rb->resval.rlname[0];
    ename[1] = rb->resval.rlname[1];
    subname[0] = rb->resval.rlname[0];
    subname[1] = rb->resval.rlname[1];
   
    // Get marker info.
    rb = rb->rbnext;
    marker = rb->resval.rint;
    if(sel_method==1 ||sel_method==2)
 {rb->rbnext;
 rb->rbnext;
 rb->rbnext;
 pickpnt.set(rb->resval.rpoint[0],rb->resval.rpoint[1],rb->resval.rpoint[2]);
 rb=rb->rbnext;
 if(rb->restype==RT3DPOINT)
 {
  pickvec.set(rb->resval.rpoint[0],rb->resval.rpoint[1],rb->resval.rpoint[2]);
  rb=rb->rbnext;
 }
 }
    return 1;
}

 

调用该函数后能够获得实体名、选择方式、GS,但是选择点pickpnt和 pickvec总是(0,0,0),不知为什么?

各位帮帮忙吧!感激不尽!!

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-3-12 10:22 , Processed in 0.166045 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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