明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4720|回复: 3

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

[复制链接]
发表于 2008-7-4 10:09:00 | 显示全部楼层 |阅读模式
有谁发一下acutBuildList的函数定义,说明,谢谢
发表于 2008-7-9 09:22:00 | 显示全部楼层

下面是liub1979说的,包含了数据个数确定和不确定时的用法:

当数据个数确定时,用acutBuildList也很方便

 struct resbuf *pointlist;
 ads_point pt;

for(int i=1; i < n; i++){

pt=XXX;

pointlist= acutBuildList(RTRESBUF, pointlist, RTPOINT, pt, 0);

}

发表于 2008-7-10 18:06:00 | 显示全部楼层

struct resbuf *

acutBuildList(

int rtype,

... unnamed);

rtypeDescription to come
unnamedDescription to come

Creates 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 MSITStore:C:\arx%202002\docs\arxref.chm::/Globals/AcUt/acutRelRb.htm">acutRelRb().

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 File

acutads.h
发表于 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

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

本版积分规则

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

GMT+8, 2024-11-25 16:19 , Processed in 0.169300 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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