|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
3 j/ D! T i6 t8 a% U1 L: j
. t9 v$ f3 Z7 b其实主要是Note的类型的定义问题,参考代码如下:
, S4 q, Q8 g8 t1 z2 h! _; @
' G1 ~& v, [4 H: B! ]2 e8 L% `3 y+ \$ J/ g* Y$ _
Private Function selectNotes(ByVal prompt As String) As Annotations.Note()1 g) e& _, q5 g# S
Dim mask(0) As Selection.MaskTriple# a m- `( o! s3 U! Y1 @* h
With mask(0)" f6 l8 I8 g5 ~. T3 ^: h( _
.Type = UFConstants.UF_drafting_entity_type
% I; m# ]" Y" @* O% d1 x/ j8 z .Subtype = UFConstants.UF_draft_note_subtype7 |4 y: h1 a4 E- f7 A. W) ?0 k! y
.SolidBodySubtype = 0
% S: }( a0 k4 F& X( T End With) ~4 e w( d* H. I2 e. ]
Dim cursor As Point3d = Nothing
7 V+ U G; `' N- T Dim theObjects() As TaggedObject = Nothing$ K7 z+ f& p. r$ m0 g
1 R/ I* k* q+ r+ s+ r UI.GetUI().SelectionManager.SelectTaggedObjects("Select Notes", prompt, _
2 J# {- E1 {) u; | Selection.SelectionScope.AnyInAssembly, _
0 R! Y" H( h9 a6 P Selection.SelectionAction.ClearAndEnableSpecific, _$ E( `9 h0 i, e
False, False, mask, theObjects)
- d$ I6 `6 p% B3 n" X, g
7 B3 p/ G9 a: e2 b Dim theNotes(theObjects.Length - 1) As Annotations.Note
5 e' R' S! W8 z! L0 w( e. {9 A For ii As Integer = 0 To theObjects.Length - 1$ M* r, U0 V- I, w/ \% U
theNotes(ii) = CType(theObjects(ii), Annotations.Note)7 q4 o6 L* k+ A: S5 T. j2 D) K
Next
: o* }& J$ ^3 E2 x5 O. u; C, L5 X7 @: o& |0 r0 k6 k4 g r+ N
Return theNotes% B( S$ _- Q6 c' v
' k/ j/ i% D" j2 L5 w. ^! B6 j
End Function' w; H6 _7 S: [ h3 }/ C
1 j8 |: F5 N' ^/ j1 W |
|