struct resbuf*备忘 acedSSGet(_T(“WP”使用动态点集

作者: admin 分类: C++,CAD,ObjectARX 发布时间: 2020-10-21 19:58

struct resbuf*是一个链表

普通的使用使用如下形式

struct resbuf *rb;//结果缓冲表

rb=acutBuildList(RTDXF0,TEXT("DIMENSION"),RTNONE);

rb=acutBuildList(RTDXF0,TEXT("ACDBENTITYDRAW"),RTNONE);

rb=acutBuildList(-4,TEXT("<OR"),RTDXF0,TEXT("DIMENSION"),RTDXF0,TEXT("TOLERANCE"),RTDXF0,TEXT("INSERT"),-4,TEXT("OR>"),RTNONE);

acutRelRb(rb);

ads_name sset;

struct resbuf *bufList=NULL;

for (int i = 0 ;i < pts.size(); i++)

{

if (bufList == NULL)

bufList=acutBuildList(RTPOINT,asDblArray(pts.at(i)),RTNONE);

else

bufList=acutBuildList(RTRESBUF,bufList,RTPOINT,asDblArray(pts.at(i)),RTNONE);

}

acedSSGet(_T("WP"),bufList,NULL,NULL,sset);

acutRelRb(bufList);

acedSSFree(sset);

#define RTNONE    5000 /* No result */

#define RTREAL    5001 /*Real number */

#define RTPOINT   5002 /* 2D point X and Y only */

#define RTSHORT   5003 /* Short integer */

#define RTANG     5004 /* Angle */

#define RTSTR     5005 /* String */

#define RTENAME   5006 /* Entity name */

#define RTPICKS   5007 /* Pick set */

#define RTORINT   5008 /* Orientation */

#define RT3DPOINT 5009 /* 3D point – X, Y, and Z */

#define RTLONG    5010 /* Long integer */

#define RTVOID    5014 /* Blank symbol */

#define RTLB      5016 /* list begin */

#define RTLE      5017 /* list end */

#define RTDOTE    5018 /* dotted pair */

#define RTNIL     5019 /* nil */

#define RTDXF0    5020 /* DXF code 0 for ads_buildlist only */

#define RTT       5021 /* T atom */

#define RTRESBUF  5023 /* resbuf */

#define RTMODELESS 5027 /* interrupted by modeless dialog */

如果觉得我的文章对您有用,请随意赞赏。您的支持将鼓励我继续创作!

发表评论

标签云