|
本帖最后由 tqtgmm163com 于 2020-1-17 17:13 编辑
m5 o) I1 W6 O7 }* }9 P: R! Y+ |3 @3 `" e# @- |
'==============================================================================
$ Z! r5 z+ F- h/ e% e, A& M' y' WARNING!! This file is overwritten by the Block UI Styler while generating
+ s! j6 L F8 v' the automation code. Any modifications to this file will be lost after
: s# f/ a% x$ l) u$ c0 Z6 H$ N' generating the code again. |2 k# R8 f" E$ I+ G
'
8 |4 {2 {" m2 ^% c U, h' Filename: C:\dlx\press.vb0 S Q- r8 n% S& e: ~- ~% ]
': K2 k1 `7 |+ f9 n
' This file was generated by the NX Block UI Styler; O3 @4 f8 m3 c* U) ]' Y( F
' Created by: Administrator
, M! }& B& L* B8 I. p- Z+ l' Version: NX 8.5
8 y+ z$ C3 ^. Y/ N& j' Date: 01-06-2020 (Format: mm-dd-yyyy)
b) J( b# p. F( T1 k' Time: 16:31 (Format: hh-mm)
: X! t) G; f. T( J1 x3 K) u9 L6 B'6 G! V6 ]- b( ]9 ?! }; `5 R
'==============================================================================
5 F4 C9 c- ]. \6 G# Y8 s8 X) X) c8 ?* C% q/ T4 P/ B4 v, m3 W/ ^' A7 o
'==============================================================================
8 V( f1 P- o( L. k" U, ['==============================================================================
4 Y& P s6 J+ I$ }1 i9 [' x n! P% A: _5 z# n7 U
'------------------------------------------------------------------------------' R7 i9 |7 |" L0 l* h
'These imports are needed for the following template code6 m0 V6 Q# L8 Y! Q, I2 M( A$ ]
'------------------------------------------------------------------------------9 F" k" |9 N) _7 b3 u+ L8 h
Option Strict Off
" `3 u& ]2 p; t0 aImports System
+ u. C& y5 e8 N" N# y+ eImports NXOpen3 F5 n8 [0 \( t0 c
Imports NXOpen.BlockStyler
. k5 q. g8 |5 [2 Z& Q& O& M8 f- K" m! [( ~/ e& N' l: _6 D
'------------------------------------------------------------------------------
9 @' }) ?/ J. d$ Z5 [9 p. A/ {; J'Represents Block Styler application class- [( Z6 i! `. D' g. Y' Z, o) `4 K
'------------------------------------------------------------------------------
( j2 _) D2 C5 p; \. S! U0 O/ tPublic Class press. w6 w+ \' e9 T- Q3 r
'class members
4 p2 \! K+ ]8 W+ F7 g$ G" V' t Private Shared theSession As Session/ c# A) F1 C& N. i" s! C
Private Shared theUI As UI+ i; t5 e3 n; l
Private theDlxFileName As String' _2 W' X4 e0 X- V8 X: Z# H
Private theDialog As NXOpen.BlockStyler.BlockDialog
2 W) c! v$ B) ?- d% {0 A Private group0 As NXOpen.BlockStyler.Group ' Block type: Group, T* S! \0 C0 O3 U6 |# d; v; i
Private linear As NXOpen.BlockStyler.LinearDimension ' Block type: Linear Dim
, c5 {( Y5 Y6 q; s% {/ [ Private string01 As NXOpen.BlockStyler.StringBlock ' Block type: String8 N; z; U+ T1 i% |4 D
Private string02 As NXOpen.BlockStyler.StringBlock ' Block type: String. v" T/ n1 p- k5 W
Private string03 As NXOpen.BlockStyler.StringBlock ' Block type: String* k0 O# b, Q3 s. R. K B1 [
Private string06 As NXOpen.BlockStyler.StringBlock ' Block type: String
. F& Q0 U0 R2 u1 X7 W: l( t Private string04 As NXOpen.BlockStyler.StringBlock ' Block type: String
+ E; w) w5 L5 ]* e; m Private string05 As NXOpen.BlockStyler.StringBlock ' Block type: String
I) x6 v! z" d% [; \ Private string07 As NXOpen.BlockStyler.StringBlock ' Block type: String) Y) _0 N" y/ H* M
Private string09 As NXOpen.BlockStyler.StringBlock ' Block type: String) A$ P5 D' Z& c" }) N
Private string010 As NXOpen.BlockStyler.StringBlock ' Block type: String
; S2 _9 C( M+ I8 @1 b6 U Private string011 As NXOpen.BlockStyler.StringBlock ' Block type: String8 l" }' y1 F! B3 D
Private string012 As NXOpen.BlockStyler.StringBlock ' Block type: String0 @* U5 D+ j+ \0 z
Private list_box0 As NXOpen.BlockStyler.ListBox ' Block type: List Box8 h7 z( H- T; N) `# [6 w2 V
Public Shared ReadOnly SnapPointTypesOnByDefault_UserDefined As Integer = 1; E5 X T* t5 P# g/ l
Public Shared ReadOnly SnapPointTypesOnByDefault_Inferred As Integer = 2) f! w# u2 l( g, i( [; h; H
Public Shared ReadOnly SnapPointTypesOnByDefault_ScreenPosition As Integer = 44 D8 Z6 B" P9 U: }2 K4 p# U" I
Public Shared ReadOnly SnapPointTypesOnByDefault_EndPoint As Integer = 8
% r; p3 f6 U4 Q Public Shared ReadOnly SnapPointTypesOnByDefault_MidPoint As Integer = 16
; Z y( _3 n* _/ O; y) L0 d8 z Public Shared ReadOnly SnapPointTypesOnByDefault_ControlPoint As Integer = 32
0 O* v- p2 S1 |7 E Public Shared ReadOnly SnapPointTypesOnByDefault_Intersection As Integer = 64
/ E" H1 e5 d3 ?" O& G Public Shared ReadOnly SnapPointTypesOnByDefault_ArcCenter As Integer = 128
% ~; e6 L f/ ~; p8 b' n" \ Public Shared ReadOnly SnapPointTypesOnByDefault_QuadrantPoint As Integer = 2565 g5 `- D( u1 Y8 n5 j
Public Shared ReadOnly SnapPointTypesOnByDefault_ExistingPoint As Integer = 512* a' g2 f1 p5 S5 H) U% g: W1 F; U
Public Shared ReadOnly SnapPointTypesOnByDefault_PointonCurve As Integer = 1024
, J! X/ ^4 n' K3 C* t; a7 ^( `( L Public Shared ReadOnly SnapPointTypesOnByDefault_PointonSurface As Integer = 2048
6 L4 P X! ?* N" q' O3 | Public Shared ReadOnly SnapPointTypesOnByDefault_PointConstructor As Integer = 4096
( \1 \3 C" q$ m. o2 O Public Shared ReadOnly SnapPointTypesOnByDefault_TwocurveIntersection As Integer = 8192
8 G! o, ]/ G: O( Z0 m5 s* P% Q Public Shared ReadOnly SnapPointTypesOnByDefault_TangentPoint As Integer = 163847 [9 d3 [( c6 y( l: T
Public Shared ReadOnly SnapPointTypesOnByDefault_Poles As Integer = 32768. v2 `4 M K" m ^
Public Shared ReadOnly SnapPointTypesOnByDefault_BoundedGridPoint As Integer = 655364 V" ^. [4 t+ t
|# T# \/ y& `, R4 P#Region "Block Styler Dialog Designer generator code"; [$ B" N7 n0 `
'------------------------------------------------------------------------------# ~4 V& q: W! C5 k2 {5 u8 I- h% q a
'Constructor for NX Styler class
, e; h8 M4 G6 Y! k% L '------------------------------------------------------------------------------
! r: N) W6 s) ?9 y L Public Sub New()2 Q7 }& d* ~. V$ D" p& Q7 V
Try# A8 A. K1 j% _- Q
. Y! m0 E7 M+ z+ ^8 h" ?4 g theSession = Session.GetSession()
7 @, S5 G- l4 c8 r theUI = UI.GetUI()
! u7 z) M* E ~) K theDlxFileName = "D:\LIS_ug\TOOL1\PRESS-A01.dlx"
+ g r( ?9 O; J8 Q/ i/ _ theDialog = theUI.CreateDialog(theDlxFileName)
( ?/ Z. o' f6 S" d2 j5 Z theDialog.AddApplyHandler(AddressOf apply_cb)7 N$ e4 j8 t5 ~. i4 i3 q/ J
theDialog.AddOkHandler(AddressOf ok_cb)" R9 g6 B& e) [; L: G- ?
theDialog.AddUpdateHandler(AddressOf update_cb)5 t1 t* H" b( R- V. A0 v0 ^) a
theDialog.AddInitializeHandler(AddressOf initialize_cb)/ }+ V# H9 P! `$ g; b/ V' g+ e6 P
theDialog.AddEnableOKButtonHandler(AddressOf enableOKButton_cb)* a! l& W, D A+ v; @& J4 m
theDialog.AddDialogShownHandler(AddressOf dialogShown_cb)
' c! H! D9 D' l+ c8 r1 O! I& K& L7 y3 M
Catch ex As Exception3 n' l1 U& Q& l
; f7 S9 S& l7 O- D0 g
Throw ex u' t/ U( c9 L
End Try! L% r: X- o3 |! q- k2 b
End Sub
7 u# C8 o P) l* t8 F: D#End Region/ h8 _5 w" ]' h R
. B7 z3 W f2 v* G
Public Shared Sub Main()
/ o, a! G) S' R& X3 i* x+ Z Dim thepress As press = Nothing; w9 I3 g3 ?7 m4 L$ J/ ~( H# @0 O
Try# P, {/ {: d& I- T; a3 Y
$ F& [: P1 y6 W, t' u thepress = New press()
' f O P' z& i thepress.Show()
& n& X2 G0 u$ G# S7 R- b. W7 |& y3 D, ~4 f8 L y2 Z
Catch ex As Exception
) ?+ r9 a) r, _8 N5 Q9 }2 c, x; e5 q4 r
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)4 s% `0 T' `. ~+ Y0 m4 n: Y) k
Finally$ t$ X1 F. @( D3 n* s$ V" P3 E
If thepress IsNot Nothing Then
+ |7 g! E! J$ N3 q$ I thepress.Dispose()! M" K" p# d* }% V
thepress = Nothing7 d6 z8 O; v$ x2 s
End If8 n; ?8 v( S' D$ s( B, k$ ^
End Try) Y8 u& W. ?% s* M" b3 F
End Sub/ E9 k0 ?" V# u7 X8 w g
Public Shared Function GetUnloadOption(ByVal arg As String) As Integer
3 x" R9 o( _ A, S! w 'Return CType(Session.LibraryUnloadOption.Explicitly, Integer)
6 h6 u* z" ~+ ^; N: v; b, p4 g Return CType(Session.LibraryUnloadOption.Immediately, Integer)
# u( F t' j& s/ a ' Return CType(Session.LibraryUnloadOption.AtTermination, Integer)
/ |. t1 t5 d0 o5 \+ S End Function
% d2 R$ |/ s u; s# q8 v4 h Public Shared Sub UnloadLibrary(ByVal arg As String)7 z$ Y/ t5 ?1 ^ [
Try6 ]9 ^/ h# Y# v8 n! Z/ I
) v. Y( E" o# y' {
A6 t& B7 |! o+ j; _: O
Catch ex As Exception
$ i; j2 O0 Y: w/ e. ?/ f# {3 G/ ?
. b9 r" U4 C; W+ T' g3 ?6 O/ n theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString), K/ [4 B6 z* e) \7 U. ^
End Try9 L" @/ S' n/ e; v8 o
End Sub( }6 C$ X/ D v# |& x
) |: T0 S8 f1 ~% g& K; m4 s '------------------------------------------------------------------------------
" d0 F" k8 n7 ] C: a( S9 S% F 'This method shows the dialog on the screen
8 Q8 N" _% ]' p! ?, F; E '------------------------------------------------------------------------------
, {7 t8 x) u# |. z Public Sub Show()8 C, Y$ A% X* p, w
Try
- B0 C8 B0 Y9 g2 y1 j3 Q6 }0 ]0 C
. @7 x/ U9 u3 S theDialog.Show()
% N& d& |/ w" |% |1 l( {1 h( A/ \. r3 `0 L( X- {; s3 Z
Catch ex As Exception1 i" k$ |1 N1 g; }3 A7 a7 E; v
0 C7 Q4 ?( j" r* Q* S4 ]& v
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
$ v- V I7 k3 N! U3 o End Try
0 j$ ~) R4 b, B/ m( d2 W1 t End Sub U: V+ O$ A9 {) I% Q) T3 s3 s
7 W+ F; N; @5 E* L
'------------------------------------------------------------------------------
, Y! L+ S- v+ i0 }0 y 'Method Name: Dispose( F2 S- \% E: T- m7 H% v6 |! G
'------------------------------------------------------------------------------
7 Z- U6 p* E3 \; j$ b; {: { Public Sub Dispose()4 D; Z4 z" S0 Q4 e9 S6 k+ C
If theDialog IsNot Nothing Then
; R$ m4 F! _/ Z+ B) l theDialog.Dispose()
, k+ @ B" `% M0 v# }/ Z: F) V theDialog = Nothing
2 K+ V- G5 I6 n- V! W% s' c End If. \: b$ X* v2 K, x. b
End Sub
4 W) ~4 i- W! L8 g! T1 X" Q' P
0 r# Y+ T* ^, Y3 Q/ U+ f" A' s( N7 ~) [& A& e
'------------------------------------------------------------------------------. ]) M! {4 Q) ?( N
'Callback Name: initialize_cb% d# g6 }* }% L& P- Y( N3 L5 a' n' |
'------------------------------------------------------------------------------2 m3 i+ t7 e6 X9 P, F3 r
Public Sub initialize_cb()
: d0 m9 G8 \# `' z, H7 Q Try
+ W! F# J7 \2 Z" Q1 _$ _: \' `, f$ v5 _1 R, ^
group0 = CType(theDialog.TopBlock.FindBlock("group0"), NXOpen.BlockStyler.Group) P5 C$ ~; H3 X" a
linear = CType(theDialog.TopBlock.FindBlock("linear"), NXOpen.BlockStyler.LinearDimension)
) S0 v/ K, k5 d8 }* {8 h4 ~1 [ string01 = CType(theDialog.TopBlock.FindBlock("string01"), NXOpen.BlockStyler.StringBlock)$ r7 A6 y4 v$ h }# u3 P
string02 = CType(theDialog.TopBlock.FindBlock("string02"), NXOpen.BlockStyler.StringBlock)) x: q6 Z; z# ~# `& R
string03 = CType(theDialog.TopBlock.FindBlock("string03"), NXOpen.BlockStyler.StringBlock)
- e9 X. Q3 c' J) u string06 = CType(theDialog.TopBlock.FindBlock("string06"), NXOpen.BlockStyler.StringBlock)
5 u ~: Y7 e" Q0 Y8 s9 d string04 = CType(theDialog.TopBlock.FindBlock("string04"), NXOpen.BlockStyler.StringBlock)/ a) o0 E$ D! F: q4 s
string05 = CType(theDialog.TopBlock.FindBlock("string05"), NXOpen.BlockStyler.StringBlock)
2 E+ a9 F% W' u* W string07 = CType(theDialog.TopBlock.FindBlock("string07"), NXOpen.BlockStyler.StringBlock)
+ [: _, i7 Z2 V( y' a+ ]: c9 d1 G string09 = CType(theDialog.TopBlock.FindBlock("string09"), NXOpen.BlockStyler.StringBlock)
5 M7 D9 W5 @+ q8 y! B4 G7 l string010 = CType(theDialog.TopBlock.FindBlock("string010"), NXOpen.BlockStyler.StringBlock)
; v% h* J2 z. `. Y4 B, u, n+ N string011 = CType(theDialog.TopBlock.FindBlock("string011"), NXOpen.BlockStyler.StringBlock)
6 y. c5 D \7 O7 D' s9 u string012 = CType(theDialog.TopBlock.FindBlock("string012"), NXOpen.BlockStyler.StringBlock)
6 ^( O; z/ Q/ C2 S# Y- p list_box0 = CType(theDialog.TopBlock.FindBlock("list_box0"), NXOpen.BlockStyler.ListBox)
" s6 y; w/ J5 K R
; h+ q6 Z# o1 D5 x# @- r0 G" ?3 F. S) l2 S2 u9 J8 F0 q
& O& A. f c' f Catch ex As Exception$ t5 v, `2 z+ D4 h3 a: L! c& u) O! P, N7 I6 x
2 S, G4 b6 i) r6 { theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
0 F; T# V" m% J: p, K End Try3 `9 n/ ]! h) S- v5 U
End Sub
6 G# B7 S. d- m/ I" E0 \: `0 V2 O
' s. b2 r7 k0 K- [: v5 E* x4 }6 K '------------------------------------------------------------------------------
9 m% z) o; J5 E5 D: V4 P9 ^ K$ N0 ] 'Callback Name: dialogShown_cb4 D' C+ k$ p6 g5 C5 B
'------------------------------------------------------------------------------
: o/ `4 ^% d+ M Public Sub dialogShown_cb()
% X1 v, z" b, D0 E% @3 j! A Try% [( \$ C. H( ^2 f1 S+ C) q
: N, R! V b/ F/ S4 M
0 Z$ A! P8 C* ^: [3 W: E+ W
Catch ex As Exception% d+ |( s W; L( t
3 d' }! K/ \ b
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
w5 [# E0 w' t) O End Try# K; I) u+ G/ \7 k& c# Y# G. H. I
End Sub8 o; k3 n* K1 ^1 J5 y
% l' Z7 O3 T, g: m
'------------------------------------------------------------------------------
2 C; u' P. r- k# B6 g 'Callback Name: apply_cb2 \& [0 a& G; H8 c* V( b
'------------------------------------------------------------------------------( m7 {( V( x& h9 Y" o3 a
Public Function apply_cb() As Integer4 U x/ w$ X' d8 [0 I
Dim errorCode As Integer = 0: j7 V5 }4 B* S( u8 J2 @$ f. P6 T& a
Try9 G5 b$ }! u2 Q6 Z
2 i+ y5 n- [' B$ ]
9 Y3 K* F M5 C5 b* ?: b( K Catch ex As Exception
5 N7 r0 ~+ z4 A; z6 M9 Y. Q! ~3 Q
! h& s2 J# N8 P) m( `2 p$ l+ G errorCode = 1
3 {5 X3 T' q! Y' D. h theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
) n9 e9 u+ l3 j/ b5 @% T* j L End Try
6 m' ?9 R) j" G8 s. F; X apply_cb = errorCode+ |: r8 _6 U, H7 w# v1 u
End Function# Y R+ a! q: h9 Y/ r
1 r8 Q& W1 k9 C0 ?0 o4 g6 C$ J
'------------------------------------------------------------------------------- B2 F8 U. p1 {; ` n2 r' d- x. U
'Callback Name: update_cb
# I k3 O7 { C9 f' N' g6 ~ '------------------------------------------------------------------------------
% ]' L; L7 R8 n6 M$ R" H Public Function update_cb(ByVal block As NXOpen.BlockStyler.UIBlock) As Integer
8 t7 \3 K, O& G- V8 b Try7 y. X" `) X. E E% \
, u3 h4 }3 \, d [& R- P
Dim num As Single = CType(linear.Value, Single) '转浮点数
6 h% J& a9 O( r/ m9 G- z s f3 K, x Dim aa3 As Decimal = Math.Round((num * string01.Value * string02.Value * 0.001), 3) '3位小数
! G$ c8 J. O% }9 I/ o5 s9 l1 J string03.Value = aa3
1 O8 w5 R+ g) z* m* _; D. J p* I Dim aa4 As Decimal = Math.Round((string03.Value * 0.8), 3) '3位小数) ]/ e! o* V$ _4 L! R, c. o& j
string04.Value = aa4: _4 C& m. c7 p; K
Dim aa5 As Decimal = Math.Round((string04.Value * 1 / 6), 3) '3位小数
1 k7 p+ Q ?2 d* D, t' D string05.Value = aa5
9 v. P( }8 i6 o9 Z' Q, T# \ Dim aa6 As Decimal = Math.Round((string03.Value * 0.06), 3) '3位小数
1 j1 V1 R; ?3 `& _: S1 R string06.Value = aa6
, `& E( k+ v, e& F& T" w" o# R6 `: x0 \2 G1 G+ z1 B
Dim a3 As Single = CType(string03.Value, Single) '转浮点数
. G3 N! R: b b Dim a4 As Single = CType(string04.Value, Single)7 O, C. O8 _7 l/ ^6 f3 y4 b
Dim a5 As Single = CType(string05.Value, Single)
* E" w* S! e9 m, G5 Y' n Dim a6 As Single = CType(string06.Value, Single)
( ]$ i0 q+ }0 g& u0 B- }. ]
, J+ R4 G9 r" t. \6 `" a Dim b3 As Decimal = Math.Round(a3, 3) '3位小数
9 c1 g4 a( x/ m; u1 |4 y* x Dim b4 As Decimal = Math.Round(a4, 3)
/ m0 @" ~0 k3 a% E" W Dim b5 As Decimal = Math.Round(a5, 3)
9 c) ~, l/ Q8 ?2 }- q& ^ Dim b6 As Decimal = Math.Round(a6, 3)/ Q, Z- {9 k7 Y. \
1 S$ e. @' q% i3 E( E
. l) K" s5 A: W8 H Dim d1 As Decimal = Math.Round((b3 * 1.3 + b6 * 1.3), 3) '2位小数
1 b% j# Q6 z; p: H/ D" D0 ]- E' m' E Dim d2 As Decimal = Math.Round((b4 * 1.3 + b5 * 1.3), 3)6 }2 v8 j# f. d5 |: O
8 y' K. R$ y5 [2 U string07.Value = d1
# t Z1 x) x8 G! y& c" u string09.Value = d2 y% R- a$ ?% G. a- ?2 E
" }( L& e9 R3 W0 K; |
1 A& ?4 h) |0 V) P G Dim a As Single = CType(string010.Value, Single) '转浮点数
. \0 m7 n" E; {1 k, C Dim b As Single = CType(string011.Value, Single)
; V% u$ e- K) X6 {. C/ Q string012.Value = a + b0 Z" X1 }3 d6 y* L6 [8 I9 R! A3 A
4 b% t1 F% f0 k* ]
; Q* q y! x* d$ i/ f" w9 E2 q* Q( @: J
7 H0 Z# f, w7 E/ C
3 A6 U5 l4 m8 W
Catch ex As Exception
) V z& c% R; C. W; ?& s$ J& E" S2 N# D
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)8 T. K8 J" g) s! J+ x3 i# _+ l
End Try; I0 O; M( j3 r" l1 u
update_cb = 09 {4 \6 a6 d$ F+ N* d4 F0 ~8 E" z
End Function x2 F8 g3 p1 K) h
4 g% N/ C; _# k# X
'------------------------------------------------------------------------------8 e" D* G5 j: {# L! m* k
'Callback Name: ok_cb0 J% y& \% r7 Z+ M5 w* F! ^
'------------------------------------------------------------------------------; y- t, T1 f n, l9 W
Public Function ok_cb() As Integer
: {; U; L/ ]3 | Dim errorCode As Integer = 0
8 J r) W! G( G& {+ Q! B3 C Try
. D! }) c/ Z0 Q6 k; d+ T! v6 g/ ]9 P) A
errorCode = apply_cb()
p5 T8 }2 j$ r) U0 ^7 @( I/ ^0 G& v
. W' _& l0 X4 u Catch ex As Exception, K" S; w3 v' h7 i7 H/ D
- G- h9 T* @4 N I( i& a5 ^1 M' y% Z. G- c errorCode = 1
8 e. w' j8 c1 D+ N/ R* ?" u( A theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
* R5 W z1 T+ ~$ p2 E0 M* i End Try* W3 W% U( R; ~6 ]
ok_cb = errorCode
: b0 k \ T* J; _1 i& w End Function* L+ A& Q2 A, ^$ x
! C1 _, B: W( S8 J '------------------------------------------------------------------------------6 y c; f7 R+ h9 D, Z1 l3 E$ a
'Callback Name: enableOKButton_cb% z A' P: D1 f! X- l; U; @: m( Q
'------------------------------------------------------------------------------
4 E+ M6 q" t0 G2 I1 [ Public Function enableOKButton_cb() As Boolean$ ~) [# ]" \: a0 G' C
enableOKButton_cb = True
4 j0 l2 s, X4 ^ Try- ^* o/ [9 n' O0 f1 N
6 v7 ` b$ d+ I3 a* @' t8 q
5 t' j. S& O( l1 T1 {6 s Catch ex As Exception
6 v: p+ D; Q( A$ [/ a7 Y" o, D* l5 v( ]& i5 l
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString). D# B- U2 X9 D; }) Y! h
End Try/ D& ^' @, W5 u' Q+ t O9 ]
End Function% c/ B& e9 D1 `5 `" N9 M- M5 I
6 O! }) F# x' E* b5 a1 n; u( f* B0 f* c
: O4 [ c1 J7 N( p- e6 U3 L' w F '------------------------------------------------------------------------------$ ` \9 Q# ~+ Y' a+ \6 r
'Function Name: GetBlockProperties3 B. y. ?" G Y, f6 i/ X
'Returns the propertylist of the specified BlockID
) I; V4 {+ V1 t '------------------------------------------------------------------------------
# b% G- s* P4 \# d, C Public Function GetBlockProperties(ByVal blockID As String) As PropertyList9 q8 u9 d" u( q& u+ ?7 M- f3 p7 G
GetBlockProperties = Nothing2 y- V2 g9 G/ o7 L
Try
" L3 w7 r: i+ i& J4 `5 ^8 A0 H9 _5 Q; K- |. H3 k7 t4 S
GetBlockProperties = theDialog.GetBlockProperties(blockID). t" v" x F0 u, K
" }% A( n* ?, n* ?1 u% n Catch ex As Exception$ W3 O4 \* J, z) y
) k6 m' x; X( K. S+ L+ ?9 } theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
~' }% a: d& M- u% }, z End Try
- G) }- M* M; k End Function a1 n! u9 w8 e. p( _' f' B
( f+ x2 s: r( W v# U G& UEnd Class. G# R" [8 D2 t' H L
. L+ R: k/ w6 J% Q4 V+ m
; ]7 ^4 m4 o+ L5 {. y7 G |
|