|
本帖最后由 tqtgmm163com 于 2020-1-17 17:13 编辑 ; i# Q' Q% R6 f# c5 z2 S. G5 ^
z5 J' ], ~- X' }7 J: {
'==============================================================================
) c; y% V0 u0 N1 C7 m* C' WARNING!! This file is overwritten by the Block UI Styler while generating
2 Q) x" W0 o. Q) g* r& w' the automation code. Any modifications to this file will be lost after$ }0 ^; A* u# [9 r8 @# n
' generating the code again.
' D' n2 N0 s7 \& Z: e8 R'1 b x9 A5 p! j$ L, g @" f
' Filename: C:\dlx\press.vb
8 v) R; ~& b' W7 j- N B! i'0 Y; k2 d2 h& E+ z
' This file was generated by the NX Block UI Styler
t0 G; p- ~& H5 ~* ]6 E- y* T3 y' Created by: Administrator
; W2 d5 t3 D2 i7 Y" d% ~' Version: NX 8.56 P2 y; y3 q, P3 v" t; N
' Date: 01-06-2020 (Format: mm-dd-yyyy)
9 H2 j. |+ Y+ r) z5 Z' Time: 16:31 (Format: hh-mm)
/ x" T5 X* D* z' u5 s( I# \5 r5 [/ Y, s
'==============================================================================9 K9 V7 g$ s% L* t
' K) G1 ]+ A1 J- H% S- m'==============================================================================* R# m; {0 X: [
'==============================================================================
& O# Y2 o( B# s! J, E4 p6 D6 k
7 k/ j8 K! c$ T3 j, }7 ]'------------------------------------------------------------------------------ J) f& M" E4 @7 }
'These imports are needed for the following template code& r5 b6 L0 C2 z. t: D# p/ T
'------------------------------------------------------------------------------
2 p( x& _0 [& h+ K4 S: T; }) w! v% KOption Strict Off: M7 h3 k$ F- W* q t$ l. W
Imports System( q+ h+ |3 c+ {' B2 G
Imports NXOpen5 x4 m2 g" i" W1 i
Imports NXOpen.BlockStyler
7 P- p, C# A' B' Y% R: E: d% R# h) Y% i7 d c8 @
'------------------------------------------------------------------------------" X: ]( n3 R3 N1 ~
'Represents Block Styler application class
6 j/ n! Q* L( m7 }* k/ a5 i+ n'------------------------------------------------------------------------------
+ W+ T6 z2 r% u7 ?Public Class press
: o! \4 s( A; g: K( G9 l" S 'class members
9 {$ _2 g$ m' V9 N$ e Private Shared theSession As Session
% ~7 z6 T4 R1 B Private Shared theUI As UI
- m6 Q5 F" y* Y8 x& U Private theDlxFileName As String
! w- X/ A" x2 y. ? Private theDialog As NXOpen.BlockStyler.BlockDialog
0 ?+ P' e) Q) l+ n$ E' F/ X Private group0 As NXOpen.BlockStyler.Group ' Block type: Group" L t+ t. [- N% K
Private linear As NXOpen.BlockStyler.LinearDimension ' Block type: Linear Dim- i' |* J- t y# N |- f% o
Private string01 As NXOpen.BlockStyler.StringBlock ' Block type: String
6 ?" ]* @ [, k. Z- ]; f* Z8 S Private string02 As NXOpen.BlockStyler.StringBlock ' Block type: String
7 ~( Y$ `, k' [( M& w Private string03 As NXOpen.BlockStyler.StringBlock ' Block type: String: V) d+ [- b2 Z; v) G9 e
Private string06 As NXOpen.BlockStyler.StringBlock ' Block type: String
) S; j% r( k" f- J$ h* O Private string04 As NXOpen.BlockStyler.StringBlock ' Block type: String
8 f7 y% x. z) E8 _, Z `9 X' T1 O Private string05 As NXOpen.BlockStyler.StringBlock ' Block type: String9 Y# B% Z7 ]' @" W2 @
Private string07 As NXOpen.BlockStyler.StringBlock ' Block type: String% ?* k3 w/ |* }2 Z6 m
Private string09 As NXOpen.BlockStyler.StringBlock ' Block type: String
% j3 o7 B7 r9 n6 m3 d/ G1 c3 A Private string010 As NXOpen.BlockStyler.StringBlock ' Block type: String) w7 W( I9 w( W" s6 a( j
Private string011 As NXOpen.BlockStyler.StringBlock ' Block type: String$ Y; D+ H7 c; e, N' I: U4 w/ i9 {
Private string012 As NXOpen.BlockStyler.StringBlock ' Block type: String
6 W' L9 q7 X1 B/ _) R( v* i/ I Private list_box0 As NXOpen.BlockStyler.ListBox ' Block type: List Box
5 r$ q1 e P4 K Public Shared ReadOnly SnapPointTypesOnByDefault_UserDefined As Integer = 1* _( c" a! [" Y; p0 ?
Public Shared ReadOnly SnapPointTypesOnByDefault_Inferred As Integer = 2
4 A) e7 E* ~/ Q: S, S+ M$ _ Public Shared ReadOnly SnapPointTypesOnByDefault_ScreenPosition As Integer = 4: w+ N: S6 B6 t+ q$ X0 K7 b
Public Shared ReadOnly SnapPointTypesOnByDefault_EndPoint As Integer = 8* L9 i- v1 x2 c* Z8 q/ v
Public Shared ReadOnly SnapPointTypesOnByDefault_MidPoint As Integer = 163 c8 F7 H( E$ X+ j) C/ d& I
Public Shared ReadOnly SnapPointTypesOnByDefault_ControlPoint As Integer = 32
; B$ W0 Z/ L( Y2 J Public Shared ReadOnly SnapPointTypesOnByDefault_Intersection As Integer = 64
& e& f* D# Y2 Q) N6 |* d) r Public Shared ReadOnly SnapPointTypesOnByDefault_ArcCenter As Integer = 128; L3 o5 F: }( Y' u1 C; S
Public Shared ReadOnly SnapPointTypesOnByDefault_QuadrantPoint As Integer = 256
# o/ ^+ M9 L4 o: a( N4 W5 M; H) @2 I Public Shared ReadOnly SnapPointTypesOnByDefault_ExistingPoint As Integer = 512
* G( f0 ^5 X0 W5 b Public Shared ReadOnly SnapPointTypesOnByDefault_PointonCurve As Integer = 10247 W7 S9 b! G5 f4 S3 K
Public Shared ReadOnly SnapPointTypesOnByDefault_PointonSurface As Integer = 2048
* m* i0 {7 X7 y" }& Z Public Shared ReadOnly SnapPointTypesOnByDefault_PointConstructor As Integer = 40964 Z) T/ N2 U* B/ {1 [, K f! }% c) t
Public Shared ReadOnly SnapPointTypesOnByDefault_TwocurveIntersection As Integer = 8192
0 d. h- f; H4 A; d' t Public Shared ReadOnly SnapPointTypesOnByDefault_TangentPoint As Integer = 163840 f# L, m1 F+ x- v
Public Shared ReadOnly SnapPointTypesOnByDefault_Poles As Integer = 32768
/ C2 o# N- a( P4 t* o6 g Public Shared ReadOnly SnapPointTypesOnByDefault_BoundedGridPoint As Integer = 65536
. E, ]: k; J/ [* U5 x& C! P1 ^/ b* \
#Region "Block Styler Dialog Designer generator code"
( a4 x# W1 P6 j ], K '------------------------------------------------------------------------------, m& w7 n( Q9 i8 j/ ^' x& E
'Constructor for NX Styler class- `; g* P( p, w' E! x" i, i
'------------------------------------------------------------------------------
4 B% C- z; A% J$ y Public Sub New()
M$ n \ j. B+ {1 Y Try7 \8 h6 a4 }$ C' ]6 T8 o* b" A
% r2 K! z' |" U# c, i: J; u. }
theSession = Session.GetSession()) k; g& b% X$ J }; u, t
theUI = UI.GetUI(): y+ m. w3 Q |5 ^! |3 p0 O
theDlxFileName = "D:\LIS_ug\TOOL1\PRESS-A01.dlx") b' f! ^1 I& a( j$ y
theDialog = theUI.CreateDialog(theDlxFileName)
4 c. V7 O/ ?; O$ L- ~0 A theDialog.AddApplyHandler(AddressOf apply_cb)
4 a- g; n8 E# u9 t9 v theDialog.AddOkHandler(AddressOf ok_cb)! o& ?( p( M2 \( ~5 {9 {/ } s
theDialog.AddUpdateHandler(AddressOf update_cb). ~/ {! y0 q* L# }# T; O
theDialog.AddInitializeHandler(AddressOf initialize_cb)
+ m3 ~* @/ A S! d9 E; l2 n( P7 } theDialog.AddEnableOKButtonHandler(AddressOf enableOKButton_cb)
- L5 K! S: t7 G% I theDialog.AddDialogShownHandler(AddressOf dialogShown_cb)
% \1 f& @6 n2 Y/ e) Z. O ]+ Y$ O$ ~, d }' [' R
Catch ex As Exception
* g3 w4 d: n& D( |9 @# E
& ?) R* N v* m& X4 [2 w& ~ Throw ex. `9 H2 l# T9 S& i7 X J1 A7 Y6 m
End Try- z1 j& m9 v, H9 y6 h' U% v
End Sub7 R b7 L6 {% E1 D6 {. U: k
#End Region/ _0 ]% s0 W% `4 t R& r9 E& }' E/ N
4 E, K- w/ Q9 ~
Public Shared Sub Main()
* I8 g3 r" B5 @" O8 K Dim thepress As press = Nothing
$ J8 R4 @( J- x5 |$ m Try
+ p5 \, a# y7 s" A. d6 C9 i& d' C2 L
thepress = New press()
! Q1 t5 m2 j9 \: t- V thepress.Show()
+ _. y9 {5 B8 N e+ m! A$ b& G# _
3 g1 k b6 C% Z4 \7 c( u: l; H3 P Catch ex As Exception
# Q B7 N+ k2 C9 U% z. @# P/ V# U
. ^+ I& Y* p, ]& ?! U( i$ |6 G theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)3 l/ l, F$ U# v7 f" @% ~
Finally6 R+ v! r# o0 U: X% K
If thepress IsNot Nothing Then
& n1 m! J/ I0 T Z- c8 t+ y& v thepress.Dispose()
. e K/ c$ y+ {/ n! S1 \: S* n' { thepress = Nothing
j: b9 F+ Q! I& g End If# u) _, T' C& Z. ~
End Try* v, A6 @3 N# P
End Sub3 g" S+ k" h* V
Public Shared Function GetUnloadOption(ByVal arg As String) As Integer0 |- g; S% V5 j: u2 ]% s+ B
'Return CType(Session.LibraryUnloadOption.Explicitly, Integer)
9 B# |/ Z5 |. M& w/ S Return CType(Session.LibraryUnloadOption.Immediately, Integer)
# N+ C, E1 g* n4 \ V1 y/ b ' Return CType(Session.LibraryUnloadOption.AtTermination, Integer)9 \+ n; m0 ~& l( J5 p, G
End Function6 N0 @' n5 g% e% U$ `: \0 f6 Y. ]$ P( b
Public Shared Sub UnloadLibrary(ByVal arg As String)# p- B/ g; i( Z s4 x5 w
Try
, Y' @ _, |" s/ e5 I, n; \+ k" ]" C. }" ~8 C
) o! P$ x9 j9 X" L9 A4 f4 z Catch ex As Exception
& {9 t O0 P5 D4 B* s
7 m4 \, G% p. Q- R theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)( t a/ J" M! l" D9 L
End Try0 g3 o# q, u/ v% _& L) x) E" [
End Sub, S V% ^" y3 I1 R: i3 K
* c5 V2 ~0 B: }: I% {6 u% y+ \ '------------------------------------------------------------------------------
! F- Q1 q4 E# t3 T5 U. R& T 'This method shows the dialog on the screen; A1 I& e9 q# r# Q2 ~% v/ x% r* k( v
'------------------------------------------------------------------------------% c+ ^- q* D3 T2 M( M( j
Public Sub Show()
4 e/ D" X5 a! P6 x Try
7 z9 N1 C% w( O/ b( j j0 H
4 y! `' i2 j# ?4 g6 i+ o$ r' U' a theDialog.Show()
& ~) ~. U0 t M9 `, A3 b* R0 u7 ~
/ \6 h) W$ @3 ]4 ^ Catch ex As Exception
1 q1 R* b, {8 N; J) F7 x4 ~+ P3 h0 K9 K8 r& @+ m, @
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
6 q0 m" M3 |" |" I/ {: Q. f End Try
$ Y5 E; J7 B. K6 y" @, X5 P# L* J End Sub
5 Z# @0 p* r7 f4 Z* {$ q
6 z# U ?: N2 m2 m- M '------------------------------------------------------------------------------
- _; b$ {" `% n, Y$ e3 N. P 'Method Name: Dispose9 i$ I9 x+ [% w
'------------------------------------------------------------------------------' j* V, C3 F: W/ t0 ~
Public Sub Dispose(), k2 e) `9 T& ~: c" Q* S
If theDialog IsNot Nothing Then |# ~' l7 y8 }; g1 X& y9 J
theDialog.Dispose()
j1 e) e* V% s, v6 u# ~$ O theDialog = Nothing
( `: T* P+ Q8 p) }3 c: }& R. D End If; y' Z& b" X' p! I4 \- ^! {
End Sub
* K" _) N" j- W: _. Z7 R+ q8 Z7 E* Y3 K. K6 _/ i7 P {
( ?0 m' w8 j2 p: h) [- ?0 z '------------------------------------------------------------------------------
, S7 q1 ~- A/ K* k9 B1 z3 t 'Callback Name: initialize_cb4 p$ d9 ]* N P! b
'------------------------------------------------------------------------------
6 y: `$ T8 H4 |# h8 E3 s! G Public Sub initialize_cb()7 `! D2 Q0 Y3 Y1 q9 b* I4 p
Try+ Q* ]' U- Y4 L# U2 @
: H: E# ?5 _& B; t6 W! S; n2 Q- W
group0 = CType(theDialog.TopBlock.FindBlock("group0"), NXOpen.BlockStyler.Group)! x9 s7 Y; a8 J# @% i( Y' p
linear = CType(theDialog.TopBlock.FindBlock("linear"), NXOpen.BlockStyler.LinearDimension)* E% l; Z. ^$ g+ g8 X9 W! V0 Z; w
string01 = CType(theDialog.TopBlock.FindBlock("string01"), NXOpen.BlockStyler.StringBlock)
; X: U# Y- _4 K, S, G2 H6 f string02 = CType(theDialog.TopBlock.FindBlock("string02"), NXOpen.BlockStyler.StringBlock): a* P$ O5 d4 g- w" @9 z X
string03 = CType(theDialog.TopBlock.FindBlock("string03"), NXOpen.BlockStyler.StringBlock)
! }9 A8 B6 ~8 `; G! r string06 = CType(theDialog.TopBlock.FindBlock("string06"), NXOpen.BlockStyler.StringBlock)
; G3 C$ ?- a9 | string04 = CType(theDialog.TopBlock.FindBlock("string04"), NXOpen.BlockStyler.StringBlock)
. l( f& ~% T* G' V0 |0 f string05 = CType(theDialog.TopBlock.FindBlock("string05"), NXOpen.BlockStyler.StringBlock)
# Y# z* ?! R' C' L2 o7 S string07 = CType(theDialog.TopBlock.FindBlock("string07"), NXOpen.BlockStyler.StringBlock)6 L0 }) n* E8 K; m
string09 = CType(theDialog.TopBlock.FindBlock("string09"), NXOpen.BlockStyler.StringBlock): E1 ^- c( T# {0 V$ g) i5 j
string010 = CType(theDialog.TopBlock.FindBlock("string010"), NXOpen.BlockStyler.StringBlock)
/ `3 e0 ^5 p! Q8 {. Z string011 = CType(theDialog.TopBlock.FindBlock("string011"), NXOpen.BlockStyler.StringBlock)% n7 _+ N3 k1 }/ X- V! x
string012 = CType(theDialog.TopBlock.FindBlock("string012"), NXOpen.BlockStyler.StringBlock)
2 S8 e: U9 W8 S list_box0 = CType(theDialog.TopBlock.FindBlock("list_box0"), NXOpen.BlockStyler.ListBox)- A$ w( F! ^& j2 T/ ~% H) p
% ]/ m$ a$ a$ Q- g. H, c- o
$ a2 X' {1 c2 q( R; i- \# V7 K) e, i4 ~8 N ?4 A V
Catch ex As Exception6 H) W0 b2 n! D
; l; G9 `0 }" k8 |% O theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
! T$ I. H c8 n End Try
! A) K& J: P9 `. l End Sub% x: f; Y* F2 C/ B
7 S/ [8 H6 }; O v1 a' r7 {! p/ Z2 e '------------------------------------------------------------------------------/ e7 o2 ^; A* C, E+ R
'Callback Name: dialogShown_cb
/ a7 ]. }" r4 s9 b '------------------------------------------------------------------------------2 X5 E6 G/ p/ O3 S
Public Sub dialogShown_cb()
; ~: H3 A; \! G Try
# i6 x) }) B1 s% ~1 V6 D3 @
* I, m9 x5 I8 _4 i+ K0 Q6 Q. w7 R/ i1 R
Catch ex As Exception2 s! c2 w% w6 C @
, u3 @; d$ {- w- m q4 P5 U4 V; G
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
6 Q! s2 r. O. c! s6 r- [0 v End Try" R6 ]" \+ G# K: R
End Sub% s! P5 D& R! l1 L. @& P
& g% u$ C6 y+ K, g0 ?
'------------------------------------------------------------------------------+ w- }2 A O% h0 `0 R8 I
'Callback Name: apply_cb# Y/ Z4 D F8 j; V4 ]
'------------------------------------------------------------------------------
. L+ Y" B% W9 M Public Function apply_cb() As Integer0 f6 o! V, p0 c( K- p6 w" P
Dim errorCode As Integer = 0" l9 F( m0 r! e
Try
) b% V7 z& s/ f! G4 |! M6 n) T3 D, p4 p2 J! r1 [1 w, s1 U/ G
+ l* T7 V Q7 _ m' \
Catch ex As Exception
7 g/ I) d k8 k8 X! n0 e& V* g& s- G" s4 U7 h
errorCode = 1
3 L' G$ k( {4 p3 ]* m theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
- C4 q* q7 m3 _. l" ?. X End Try
8 i I) i" a! q. ? apply_cb = errorCode5 X" x* n/ {3 i- y
End Function$ Y- Y6 x- K- g- e- I
6 e6 M% \3 d, x5 f
'------------------------------------------------------------------------------
8 s/ ]; B6 F- u. { 'Callback Name: update_cb$ m' u' a% W C P: I
'------------------------------------------------------------------------------2 ?3 s& _6 u% L! S- _* K6 l; `
Public Function update_cb(ByVal block As NXOpen.BlockStyler.UIBlock) As Integer" ^, U4 b, A! d# I4 {
Try
3 N9 f2 w& Y. C
4 x" P4 h% |% A4 M- b7 ^ Dim num As Single = CType(linear.Value, Single) '转浮点数
. L. a8 x+ h* Q9 k# v0 L, C) k Dim aa3 As Decimal = Math.Round((num * string01.Value * string02.Value * 0.001), 3) '3位小数
0 x; ^% ?" k7 l8 l! r \& r* v' { string03.Value = aa3
: ]% V0 `9 _+ d F0 A9 d Dim aa4 As Decimal = Math.Round((string03.Value * 0.8), 3) '3位小数
' U; K3 y/ O( z+ I8 D, N string04.Value = aa4' o) Y) Q/ x1 D- b; M$ d
Dim aa5 As Decimal = Math.Round((string04.Value * 1 / 6), 3) '3位小数# X0 S. ^, s* n1 p J5 ~
string05.Value = aa5
- e) g2 {9 z/ X( ?' e2 t, ] Dim aa6 As Decimal = Math.Round((string03.Value * 0.06), 3) '3位小数
$ k1 `9 M: \9 F$ l* e8 u- R. Q" F string06.Value = aa6
/ C, t" \9 `5 Y+ S$ w7 s+ |1 z$ n# d2 R B5 } _* M
Dim a3 As Single = CType(string03.Value, Single) '转浮点数
# Y3 D& J$ q) o6 y3 S Dim a4 As Single = CType(string04.Value, Single)! A7 y( Q# ]! h) l
Dim a5 As Single = CType(string05.Value, Single)8 ^4 ~0 N- X( h" ~/ H+ L' w
Dim a6 As Single = CType(string06.Value, Single)
. j2 L" d7 @" N
J9 I. E5 L+ a/ L0 L4 [ Dim b3 As Decimal = Math.Round(a3, 3) '3位小数
3 i7 I$ Y1 V5 f9 S% j Dim b4 As Decimal = Math.Round(a4, 3)# E, [( O. J2 f: y
Dim b5 As Decimal = Math.Round(a5, 3)- A9 T7 X# @9 P& c; }
Dim b6 As Decimal = Math.Round(a6, 3)
$ Q+ y4 m8 J8 Y& D1 I$ _; t/ f6 z! u" ~) H d' d s
3 `: Q/ N: Y- [0 j" M7 }8 |! ]
Dim d1 As Decimal = Math.Round((b3 * 1.3 + b6 * 1.3), 3) '2位小数0 Q5 v& M# F! q% I8 l j
Dim d2 As Decimal = Math.Round((b4 * 1.3 + b5 * 1.3), 3) l& G+ K$ u. s1 g7 Q
8 @. M6 L; A1 {. o8 j
string07.Value = d15 l' m2 W L% Y" O: i0 I
string09.Value = d2
& `! y* x; o+ {( @+ H
- n5 Q: ]3 ]9 _# U/ \. M7 j* d2 n
Dim a As Single = CType(string010.Value, Single) '转浮点数
( \+ B' g( w$ }1 h, b' D. B Dim b As Single = CType(string011.Value, Single)
) j+ D, n/ u. V, Z0 ^; x string012.Value = a + b
4 |0 ]$ [& j- i: S) E _% s, j6 @; z
: L' v: U6 C9 l' z0 K
, A& ~# [: x. L! @" Y' ] @$ n
8 k7 U: C5 [! w! @; v: ?9 X6 T
U. k" `* d/ I2 S- d1 A- z Catch ex As Exception
5 c1 }0 m& B) u8 ]. ?; m# j# }- w
8 V( z: [% H, x$ K9 i+ H1 \ theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
6 f+ z4 Q# E9 z5 v6 U, K End Try
2 u" O# Q4 J, s update_cb = 0
) J5 G$ s v& b+ f End Function0 ?( z% _' \ g" i* ]) o9 A
# Y$ l) U+ w( V
'------------------------------------------------------------------------------- f- l; C$ j8 _& y* {8 L
'Callback Name: ok_cb9 z# S( d5 s# z! j9 V
'------------------------------------------------------------------------------
2 o) I7 d7 {5 M* [' X5 P! l Public Function ok_cb() As Integer8 _, L2 q, w4 o# t, P
Dim errorCode As Integer = 0+ R5 `6 ?! r; ~( E4 H$ f
Try' y% ?9 J+ e l
0 O2 q1 F& E" P2 p: e6 p+ b+ @* [, ? errorCode = apply_cb()
, d5 @5 q; H2 U1 I' r- h" ?
* k6 b: a; ?, \- ~" d1 Q Catch ex As Exception
. Z, z+ l+ U2 _1 q' S: M& L8 k2 b0 Y. C1 O) ?1 `
errorCode = 18 b/ p2 F0 W l# }
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
; {! z# n; p- {2 \% | End Try' @# ?# d2 r) A/ X
ok_cb = errorCode4 ^0 E2 [! z, ~8 F2 c/ {
End Function( o, m, z- j9 W
& u( _) ?1 I8 m '------------------------------------------------------------------------------% ]$ O2 e+ h% o1 N! t
'Callback Name: enableOKButton_cb
3 V2 z/ B# y5 Y4 g6 j. h '------------------------------------------------------------------------------+ y0 J2 q. @1 E; ~* O8 T
Public Function enableOKButton_cb() As Boolean6 \# @2 T2 m- G( n5 y
enableOKButton_cb = True
6 f! v* p+ e; q: `. f7 y Try) h* K2 r4 z7 h9 M2 |! q0 ?2 j$ Y
. [. f$ i; b F! l# }% h2 A
" U! f$ J' k/ s( Y/ [ Catch ex As Exception
. ?$ t# ]9 K) U& f
5 X, A1 ?) W$ {: C2 b theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString) K$ ]) h( F4 \+ w, M
End Try
9 ?# E9 a; a$ u- D# c9 s1 H End Function S4 S5 V2 O( i: u
# `8 r$ L1 q5 u0 [5 {
' O: K8 ]' w/ x3 f7 g# _5 e( c6 q4 j5 p" |7 r
'------------------------------------------------------------------------------
/ e) Y6 l& M+ c! @ 'Function Name: GetBlockProperties4 N) S% F, n. r* b0 h1 @) x. _
'Returns the propertylist of the specified BlockID, h; K/ a' u/ l
'------------------------------------------------------------------------------
8 z7 q4 y* `" j0 V8 v! M: ^ Public Function GetBlockProperties(ByVal blockID As String) As PropertyList
2 }8 z- R% w) N GetBlockProperties = Nothing/ l5 O* {" m! y" s4 D( l
Try
9 Q/ b5 G( N D5 U/ L$ P! S/ L
4 M& X- ~0 u: w GetBlockProperties = theDialog.GetBlockProperties(blockID)
* l/ F1 w" m! x2 m, j6 Y2 o6 e# g/ s! ^3 [
Catch ex As Exception
: p9 ?1 n1 g" s, s. d( A& k9 m J" O, h% d1 S" f
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)) \) x$ b. d, b b: e5 c
End Try7 p* R* V% L- M9 z( K% _
End Function
: j$ _: }4 i) _3 t0 ~+ f7 `* b2 M& n3 v2 V' A- F% \
End Class$ A8 c$ _9 B& q6 k. W& O
7 W8 n$ H' s" P, q. [( M% j
. y$ Z& O5 p( D4 U, w
|
|