|
int type;2 B/ h7 g/ K& c9 A9 B4 U: ~
char obj_name[10];
. Y" ]- N4 _7 x# \ char part_name[MAX_FSPEC_SIZE+1]="D:\\uf_project\\uf_thread\\luoxuanxian_reference_part.prt";# `2 o( T5 V( ?
tag_t part,sel_obj=NULL_TAG;
, P2 R5 {3 d5 s ' X7 c, s' S' ]" X8 L
tag_t feature_array[1],old_parents[1],new_parents[1];
' k$ ~ _2 e$ P& o tag_t *feature_new_array;
! Q' [+ |3 i9 Q! h4 N double translation[3]={10,200,0};
* Z2 e$ R/ P) b, ]2 b double matrix[16]={0};
& R' w$ V' ? F0 Z tag_t objects[1]={NULL_TAG};: [: m1 ~$ J7 L( Y
2 h# d4 `' }6 b# j% X0 G" K
int n_object=1;. T. e5 I3 L" `% J
int copy_or_move=1;, r. @# w' y. b# K9 r/ f
int dest_layer=0;4 C* q: k8 x8 P" s
int trace_curve=2;" W1 r" n3 A3 g7 [' O+ U: V3 p# a
tag_t copies;
. l: h3 }# f% O5 X) s tag_t trace_curve_group;! ? |, e: a; |0 P
int status;
# e" W1 p0 i0 ^5 S UF_PART_load_status_t error_status;
% w9 U, [& l- |! d UF_PART_open_quiet(part_name,&part,&error_status);. D# z5 _) I1 G% t6 l$ e: p4 F; F
if(UF_PART_is_loaded(part_name) == true)
! S) o3 h' k7 n/ R$ S! i! ~ {5 I0 c' V: q0 V& i7 p% }
type=UF_feature_type;
7 q: @0 p7 q. s) C! ]2 L$ ^ strcpy(obj_name,"Helix1");9 L+ F( S. ^2 Y" {3 G) L
UF_OBJ_cycle_by_name_and_type(part,obj_name,type,false,&sel_obj);
1 W/ v- S7 w# P feature_array[0]=sel_obj;
% z. m G( V1 \4 n9 x: D+ A UF_MODL_copy_paste_features(feature_array,1,old_parents,new_parents,0,0,0,&feature_new_array);# n( V" d! V- `$ j0 F# r
UF_MODL_ask_feat_body(feature_new_array[0],&objects);
7 C1 G8 V8 P# W w& T( w/ o# }/ | uf5943(translation,matrix);( w2 P5 N4 }. }$ q: \, _, |7 Y6 U7 C2 x
uf5947(matrix,objects,&n_object,©_or_move,&dest_layer,&trace_curve,&copies,&trace_curve_group,&status);
+ s. o9 p+ ^- `! ]7 W2 f* i( x }
& l7 o! `% h W; m/ Y! ~; K7 A- y" E" q3 I/ c. l! e
以上是我的程序代码,不知道是怎么回事,程序运行正确,在Debug时发现&objects的tag值不正确,希望高手们能帮我解决这问题,困扰中 |
|