乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 42|回复: 3

有谁发一下acutBuildList的函数定义,说明

[复制链接]

3

主题

3

帖子

1

银币

初来乍到

Rank: 1

铜币
15
发表于 2008-7-4 10:09:00 | 显示全部楼层 |阅读模式
有谁发一下acutBuildList的函数定义,说明,谢谢
回复

使用道具 举报

10

主题

131

帖子

7

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
171
发表于 2008-7-9 09:22:00 | 显示全部楼层
下面是liub1979说的,包含了数据个数确定和不确定时的用法:
当数据个数确定时,用acutBuildList也很方便
struct resbuf *pointlist;
ads_point pt;
for(int i=1; i
pt=XXX;
pointlist= acutBuildList(RTRESBUF, pointlist, RTPOINT, pt, 0);
}
回复

使用道具 举报

2

主题

7

帖子

1

银币

初来乍到

Rank: 1

铜币
15
发表于 2008-7-10 18:06:00 | 显示全部楼层
struct resbuf *
acutBuildList(
int rtype,
... unnamed);
rtypeDescription to comeunnamedDescription to comeCreates a linked list of result buffers.
Builds a result-buffer list from individual data items by allocating result buffers, assigning them the values specified by the acutBuildList() arguments, and linking the buffers together. The acutBuildList() function has a variable-length argument list. Most arguments to acutBuildList() are treated as pairs. The first of each pair identifies the type of the argument that follows, and the second contains the actual data. The exceptions are RTLB, RTLE, RTDOTE, and the -3 that is used to indicate the start of xdata. The type code (rtype) arguments must be result type codes as defined in adscodes.h (for example, RTPOINT), or valid Drawing Interchange Format (DXF) group codes (for example, 10). In lists that employ DXF codes, group 0 must be represented by the result type code RTDXF0. The final argument in the list must be a single argument whose value is 0 or RTNONE.
Warning Entity definitions begin with a 0 group that describes the type of the entity. Because lists passed to acutBuildList() can be terminated with 0 or NULL (as well as RTNONE), this creates a conflict. The special result type code RTDXF0 resolves this conflict. Construct the 0 group in DXF lists passed to acutBuildList() with RTDXF0. If you attempt to substitute a literal 0 for RTDXF0, acutBuildList() truncates the list. The RTDXF0 code should only be used with the rtype parameter, use a real zero (0) with the remaining parameters.
An ARX application is responsible for releasing the memory it allocates. Release each list created by acutBuildList() by a matching call to .
If acutBuildList() succeeds, it returns a pointer to the newly created list. If 0, RTNONE, or NULL is the only argument passed to acutBuildList(), or if it fails because it lacks memory or includes incorrect arguments, it returns a null pointer.
Include Fileacutads.h
回复

使用道具 举报

2

主题

7

帖子

1

银币

初来乍到

Rank: 1

铜币
15
发表于 2008-7-10 18:08:00 | 显示全部楼层
其中int rtype 定义如下: (列举常用的)
                      AcDb:: kDxfXdAsciiString  = 1000,
                             kDxfRegAppName     = 1001,
                             kDxfXdControlString = 1002,
                             kDxfXdLayerName    = 1003,
                             kDxfXdBinaryChunk  = 1004,
                             kDxfXdHandle       = 1005,
                             kDxfXdXCoord       = 1010,
                             kDxfXdYCoord       = 1020,
                             kDxfXdZCoord       = 1030,
                             kDxfXdWorldXCoord  = 1011,
                             kDxfXdWorldYCoord  = 1021,
                             kDxfXdWorldZCoord  = 1031,
                             kDxfXdWorldXDisp   = 1012,
                             kDxfXdWorldYDisp   = 1022,
                             kDxfXdWorldZDisp   = 1032,
                             kDxfXdWorldXDir    = 1013,
                             kDxfXdWorldYDir    = 1023,
                             kDxfXdWorldZDir    = 1033,
                             kDxfXdReal         = 1040,
                             kDxfXdDist         = 1041,
                             kDxfXdScale        = 1042,
                             kDxfXdInteger16    = 1070,
                             kDxfXdInteger32    = 1071
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-2-6 06:56 , Processed in 0.169915 second(s), 60 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表