标题: Array of object identifiers???->这个FTN(uf5947) [打印本页] 作者: DEEPMOON 时间: 2005-10-5 15:17 标题: Array of object identifiers???->这个FTN(uf5947) extern UFUNEXPORT void FTN(uf5947)(
const double *rp1, /* <I>
Defined Transformation Matrix. This must be
a 16 element array. This array should be
initialized using the functions uf5942-uf5946
to produce the required transformation.
*/
const tag_t *np2, /* <I>
Array of object identifiers.
*/
const int *ip3, /* <I>
Number of objects in np2 array.
*/
const int *ip4, /* <I>
Move/Copy Status
1 - Move
2 - copy.
*/
const int *ip5, /* <I>
Destination Layer,
0 - the original layer,
-1 - the work layer
1 - 256 - the specified layer
*/
const int *ip6, /* <I>
Trace Curve Status, 1 means on, 2 means off.
*/
tag_t *nr7, /* <O>
List of copied object identifiers. This is
not used when ip4 = 1. When ip4 is 2, this must
be dimensioned by the caller as large enough to
contain the same number of objects that are in np2.
*/
tag_t *nr8, /* <O>
Group of trace curves. This is not used when
ip6 is set to 2.
*/
int *ir9 /* <O>
Status Code
0 - Success
1 - Too Many Or Too Few Entities To
Transform
2 - Invalid Parameter
3 - Invalid Object (Not Alive Or Not
Transformable)
4 - Shear Matrix With Non-shearable
Objects In The List
5 - Modeling update error
6 - Error adding modeling data to copied solid
7 - Cannot scale parametric solid
8 - Transformation is unsuitable for the object
9 - Cannot scale developed curve
10 - Cannot mirror solid
11 - Cannot transform occurrence
12 - Cannot transform sketches or sketch curves
*/
);
上面这个fucntion中np2是一个tag_t的数组的指针,但是事先并不知道有多少个实体,数组成动态的了,怎么弄啊,同志们?作者: pzytony 时间: 2005-10-5 18:46
ip3是数组np3的数量,可以进行动态分配,方法如下:
//分配
int ip3 = 10;//假设
tag_t *np2 = new tag_t [ip3];
//释放
delete [] np2;作者: DEEPMOON 时间: 2005-10-5 20:47
我是想把所有的object放到数组里,
哎,这个数量还不知道!
感觉在api里面真是寸步难行啊~作者: lzrocking 时间: 2009-4-24 14:01
什么情况下会出现返回值为5,即Modelong update error作者: 无雨 时间: 2011-3-25 19:30
俺是新手,被这个函数弄得好头疼啊