|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
" `9 y3 w7 L; f; T* S* ]
. ]& U- I8 A& H* H7 I其实主要是Note的类型的定义问题,参考代码如下:8 d- f0 }3 M' P1 T! `8 t
3 Q$ V ]$ B" H) E2 y* u
) i1 `$ i0 F/ W, Z5 \0 s8 [ Private Function selectNotes(ByVal prompt As String) As Annotations.Note()" A7 c$ R9 M/ e/ ?4 r
Dim mask(0) As Selection.MaskTriple
* P0 N$ @5 F( C" ` With mask(0)% u: Z( a0 o: X, n% A" I* d
.Type = UFConstants.UF_drafting_entity_type
) l% w5 W3 o9 W6 E4 O1 U4 U .Subtype = UFConstants.UF_draft_note_subtype
0 O! E9 B, v5 x( d$ R" Q$ |" P .SolidBodySubtype = 06 Z3 C6 h+ D A" E6 j# O
End With6 y' H2 X4 y4 j7 \* ^* X1 J2 d
Dim cursor As Point3d = Nothing
4 R% L, w" h8 I3 B* N+ R6 d, E% B Dim theObjects() As TaggedObject = Nothing
6 E) O7 |' k3 M; D, [' { z5 Z
* Z. p$ N, I8 X& Y" E UI.GetUI().SelectionManager.SelectTaggedObjects("Select Notes", prompt, _
D5 I' |5 p8 d6 w2 `: t! N( @& n* ~ Selection.SelectionScope.AnyInAssembly, _
! Q$ R, l3 C: k' E, a Selection.SelectionAction.ClearAndEnableSpecific, _
, ?* _' a' F [1 ^ False, False, mask, theObjects)# _4 w7 W5 @* a: H' E$ C: _4 D0 S
! K9 J4 m$ E( ?# o5 ~* Z Dim theNotes(theObjects.Length - 1) As Annotations.Note
9 o. e& u' X7 q$ W For ii As Integer = 0 To theObjects.Length - 1$ M% V0 C( V* m( x+ i
theNotes(ii) = CType(theObjects(ii), Annotations.Note)
0 n+ V, k7 V2 n) [; ] Next/ z3 G2 v- C7 |% |1 A$ M
- C F. a$ k% L# ]7 A1 u
Return theNotes
: `, P2 Z$ W4 C- n' {1 d8 e( ~7 b
End Function
# Z. X7 I. z( y8 ?
- H9 q# V) @4 ], f |
|