青华模具培训学校

 找回密码
 注册

QQ登录

只需一步,快速开始

青华模具培训学院
查看: 3742|回复: 1

[疑难] 删除DRAWING工程图中的文字!

[复制链接]
发表于 2010-3-10 10:59 | 显示全部楼层 |阅读模式
我现在想要删除二维工程图中的一些note文字!我想的大概过程是先通过遍历出所有的文本,然后判断文本位置坐标确定是否是需要删除的内容! 但是现在操作过程中遍历部分遇到困难,希望高手指教一下!
$ z% Z& N- H2 F+ I    我现在是这样的:
0 _9 O% D( i( [! `/ `ifail = UF_OBJ_cycle_objs_in_part( UF_PART_ask_display_part(),- y9 f" b$ n$ i' w6 S
                        UF_drafting_entity_type,&note_tag );
( M8 _  F1 y0 P& O  M2 Q6 ^: O/* Find the tag of a note. */* B( W7 R6 l: k( C
while( !ifail && note_tag )2 q/ v6 H8 U: h! a% `8 p/ m
       {5 g' ?5 j2 o( P8 c1 p
            ifail = UF_OBJ_ask_type_and_subtype(note_tag, &type, &subtype );
/ ~. N/ I2 ]3 h$ H/* Test type for the note. */8 G* q; X0 U# K2 v' m
          if( !ifail && subtype == UF_draft_note_subtype )/ Z' L5 `7 A, l  x- \
        {
, w1 j# r' E+ a$ N/* Retrieve the note information. */
9 f6 D. c2 a$ U4 W        UF_DRF_ask_ann_data(&note_tag,search_mask,&cycle_flag,ann_data,&ann_data_type,& ?' a4 W5 t* K0 M2 x5 `
                        &ann_data_form,&num_segments,ann_origin,&radius_angle);2 ^, w8 [2 D0 w0 s( N8 h
        uc5574(num_segments,ann_data,notetxt,&lengthsize,&txtlength);
, W; l" R, \: H: u        uc1601(notetxt,1);) s2 b  ?- v2 e5 p9 @
        if (0<ann_origin[0] && ann_origin[0]<297)0 E) @: Z$ E. t* g# ]
        {7 ^& g1 j7 _2 T
                UF_OBJ_delete_object(note_tag);
2 A8 g( X! n* W9 K  C        }        + S3 w+ c; n0 i) u$ v- C! f
       }
1 ~& P2 |2 ^: \, `( v/* Find the tag of next drafting entity. */* g# g0 X; @! |% \4 V# V
     if ( !ifail )
$ G9 C. E2 \- r7 y6 J     ifail = UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(),
/ M3 @3 E  w* ?. W- _% v* O3 A3 r                        UF_drafting_entity_type,&note_tag );: h+ X6 e9 S3 L( w7 o. S; T1 i
}
0 R% D  U/ u- q( ]1 p3 X这样遍历的结果是PART文件里所有的drawing工程图里的所有note文本!我需要是当前打开的这个工程图里的文本!所有请问如何得到note文本所在的工程图drawing名称,再判断它是否是当前打开的这个工程图
发表于 2010-3-21 16:28 | 显示全部楼层
与LZ有相同困惑
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|关于我们|sitemap|小黑屋|Archiver|手机版|UG网-UG技术论坛-青华数控模具培训学校 ( 粤ICP备15108561号 )

GMT+8, 2025-6-28 16:15 , Processed in 0.062476 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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