|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
- v, f3 ^# J/ w; L8 z4 n& g
" {% ]) q# T5 J- q& K* S! h$ }其实主要是Note的类型的定义问题,参考代码如下:1 ` H' e1 m$ K
/ f2 k" ]& K* ^: {# a+ C1 j/ M3 H! `) A0 _; d
Private Function selectNotes(ByVal prompt As String) As Annotations.Note()- v$ q! A0 \) N1 p- T
Dim mask(0) As Selection.MaskTriple8 S/ a. ]& B: s$ R, e( L' s4 ]
With mask(0)
& _$ m- |! D ]" |9 z7 r% }. g& t+ |) [ .Type = UFConstants.UF_drafting_entity_type& e3 T4 i0 y# i7 r
.Subtype = UFConstants.UF_draft_note_subtype
0 o, }! l9 M' S, g .SolidBodySubtype = 00 L1 ^3 f. a# o' B' j5 m$ [3 f
End With
; ?$ j9 d2 {% v$ x Dim cursor As Point3d = Nothing
" \6 u# C6 {. A Dim theObjects() As TaggedObject = Nothing X0 |7 C: I" N# y1 }
% _% H$ z! ?& Q9 x K" C
UI.GetUI().SelectionManager.SelectTaggedObjects("Select Notes", prompt, _' J6 [( L! D* N3 M0 [
Selection.SelectionScope.AnyInAssembly, _
, [ P8 N1 e3 a% s8 Q [ ] Selection.SelectionAction.ClearAndEnableSpecific, _
, Z( N1 [! z$ X False, False, mask, theObjects)
8 l0 ? R- a1 i# }
, P# a7 d3 g# p4 m, B5 |3 F Dim theNotes(theObjects.Length - 1) As Annotations.Note
U5 g' S7 R0 l) J# `3 c7 v For ii As Integer = 0 To theObjects.Length - 15 i# g& T1 \/ j: S9 K" M# s8 Q
theNotes(ii) = CType(theObjects(ii), Annotations.Note)
+ e# u0 A9 z# {& l3 x% \1 k4 ~ Next6 a8 X4 j z7 x$ k. a0 h9 u
1 b/ t/ Q" t. K7 y. Y& f
Return theNotes
+ U9 S" K8 D+ N& `' g. d8 G3 n
& u3 Z3 I! V" X End Function# l- @* N, N% _5 e* @
& a. v* ^, ]3 R5 u7 f& R9 d |
|