|
我现在想要删除二维工程图中的一些note文字!我想的大概过程是先通过遍历出所有的文本,然后判断文本位置坐标确定是否是需要删除的内容! 但是现在操作过程中遍历部分遇到困难,希望高手指教一下!
8 B0 {9 A9 L( T9 ?" ?2 q! k1 n; v 我现在是这样的:0 y. E2 _% g% B7 A
ifail = UF_OBJ_cycle_objs_in_part( UF_PART_ask_display_part(),! a( [. V3 |; u; @" R1 ~5 o
UF_drafting_entity_type,¬e_tag );
2 A9 L$ v, r, j6 p8 t/* Find the tag of a note. */
- S* { K1 |; `3 ^% o5 m& ]while( !ifail && note_tag )
7 g* z2 N G# ~9 P$ Q* M( L7 n {
* [8 \0 d) n. }5 `7 _ ifail = UF_OBJ_ask_type_and_subtype(note_tag, &type, &subtype );. ^0 M+ [" |5 ~- x( l$ n/ c
/* Test type for the note. */( ^, L( O7 @! ]) F. H) I: \
if( !ifail && subtype == UF_draft_note_subtype )* J8 b! [3 T2 l1 j K4 C- k- }
{
6 o- x; t$ L. ]1 t$ K/* Retrieve the note information. */2 g7 B8 Y# |/ Z! i% Q3 D
UF_DRF_ask_ann_data(¬e_tag,search_mask,&cycle_flag,ann_data,&ann_data_type,2 ~& X3 k: Z" _0 ?! ] A
&ann_data_form,&num_segments,ann_origin,&radius_angle);) G* N. ]+ r6 s9 r8 H
uc5574(num_segments,ann_data,notetxt,&lengthsize,&txtlength);
# G9 ?9 y0 o' N2 r$ j& [8 G uc1601(notetxt,1);
1 Q$ \( s+ Z9 J0 _% ` if (0<ann_origin[0] && ann_origin[0]<297)
# m8 l/ c) i) y( r {
0 X, Y: {5 F# q9 R UF_OBJ_delete_object(note_tag);
: t$ {5 W# p W. E } : ^$ Y5 A3 V# I1 O- h L6 v) f
}; l8 ?: k% q ^
/* Find the tag of next drafting entity. */* B) f) s( |, _% ~$ a
if ( !ifail ); ~6 l# l4 h' @/ _% a: g! B
ifail = UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(),- H& H! m; a6 k A* C5 r
UF_drafting_entity_type,¬e_tag );9 C; t; X3 R8 H+ p, f
}
( ~/ w1 B1 X/ r0 n) t0 N+ M这样遍历的结果是PART文件里所有的drawing工程图里的所有note文本!我需要是当前打开的这个工程图里的文本!所有请问如何得到note文本所在的工程图drawing名称,再判断它是否是当前打开的这个工程图 |
|