|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Q9 X& e; |1 F9 z+ A
: d S, ]% G- Z! }2 L" m其实主要是Note的类型的定义问题,参考代码如下:
/ }2 F# Y2 L$ J- ^" U/ P0 ~+ F/ X/ I1 u
1 c9 p! ]$ t( d. q6 r
Private Function selectNotes(ByVal prompt As String) As Annotations.Note()
5 _: A4 E3 t4 H+ y1 j0 D3 ` Dim mask(0) As Selection.MaskTriple2 d* s/ S6 R: R' o: S3 U
With mask(0)5 Z" D6 m& F+ R; G' D* x
.Type = UFConstants.UF_drafting_entity_type
2 S4 |7 a0 r/ I/ j; s( {; v .Subtype = UFConstants.UF_draft_note_subtype0 m- y/ o* _4 l t( K$ g4 }( b
.SolidBodySubtype = 0
/ I) \' j! Q& j4 ~/ H End With
1 u q8 f3 j; u Dim cursor As Point3d = Nothing% I0 p0 G3 _0 A
Dim theObjects() As TaggedObject = Nothing2 I0 t4 J: m$ B4 g- o' ?
9 c( a( I7 l- w/ Y9 {+ H" A
UI.GetUI().SelectionManager.SelectTaggedObjects("Select Notes", prompt, _' h/ d2 i0 n# _; q2 {
Selection.SelectionScope.AnyInAssembly, _
2 `/ q0 g; Q* F6 X- Z Selection.SelectionAction.ClearAndEnableSpecific, _" D5 L& p9 w1 T' T
False, False, mask, theObjects)! O u9 M' \6 a
# O, r0 n9 E4 `7 Y1 g* U' L Dim theNotes(theObjects.Length - 1) As Annotations.Note
' a& q. N y. |9 p) L For ii As Integer = 0 To theObjects.Length - 1
( K G8 K! ^/ q7 t) B8 X theNotes(ii) = CType(theObjects(ii), Annotations.Note)" g) r1 c) ^$ z8 E2 g f9 y
Next
( y% _8 W, s) |2 _$ [
! i: I/ K1 j4 y4 Y$ j Return theNotes4 v4 L$ q, C9 \ ]' R
5 C/ U, a: Y* j& P+ \) h; ^
End Function7 F" G' v D) d) o
" v6 A# H2 u2 I
|
|