|
本帖最后由 tqtgmm163com 于 2020-1-17 17:13 编辑 - h2 T& F$ n' p6 F
" q$ e5 g+ N0 H8 s6 I* H5 S
'==============================================================================0 p' A. ]' c# z) k9 o
' WARNING!! This file is overwritten by the Block UI Styler while generating0 V9 l# o0 p, P
' the automation code. Any modifications to this file will be lost after
1 y3 y9 G' r+ P' n. {4 }7 F' generating the code again.
) G) Y# B, R" Z'
7 W% q- d2 m+ U' Filename: C:\dlx\press.vb% g# e* L2 i& P9 B0 }8 K
'
! s# R# s! F6 c5 ~2 V' This file was generated by the NX Block UI Styler) ^7 I- O1 k$ E E- ~; Y* S0 ?0 ]! V
' Created by: Administrator
& D6 i) k2 W1 g4 D/ X, U' Version: NX 8.5
3 ?& U2 C2 `3 ?6 @' Date: 01-06-2020 (Format: mm-dd-yyyy)
/ a6 \ V' |# s1 } j$ O' Time: 16:31 (Format: hh-mm)
s/ Z$ f7 v' D2 N8 p3 ~'* J3 x' v! C, v" o( }1 x
'==============================================================================
5 k @: @# |% ^ `& S7 b/ Y+ k* l; Z: z# ]/ u% o1 m
'==============================================================================% W8 _9 {, [7 A I/ I
'==============================================================================
6 ?! m+ |* h; d3 `8 z8 `, K( Y3 W6 t# E
'------------------------------------------------------------------------------
' _" [2 v g: f9 N/ q'These imports are needed for the following template code
& j7 p$ r: ^) j) Z" ~# q'------------------------------------------------------------------------------
2 s% p2 I& j3 q z) x" `% KOption Strict Off2 N1 }2 S7 u" J8 z$ i8 o6 h
Imports System5 R7 l* l5 Y6 L( k, Y3 N
Imports NXOpen
; ?0 g, l, C" p7 }/ U& xImports NXOpen.BlockStyler
1 Q: P" D ?/ f9 _( F! X& D4 x" f" W5 F( v
'------------------------------------------------------------------------------
7 R# I2 s/ B2 c3 l; A'Represents Block Styler application class- ]1 z; B' V. ~9 L& w n8 B4 ~$ D
'------------------------------------------------------------------------------! @3 b7 S& K) S {
Public Class press) q7 G2 W/ g$ G1 @$ Z J
'class members
r/ N( I) h( D7 L: N7 u Private Shared theSession As Session, K/ ?1 P( K4 b1 \! z5 u
Private Shared theUI As UI
( u4 O2 W, ]. _4 ?4 G2 g; \ Private theDlxFileName As String
4 q& J3 K( A- g; R* \; t Private theDialog As NXOpen.BlockStyler.BlockDialog5 q4 @" H; ~6 @
Private group0 As NXOpen.BlockStyler.Group ' Block type: Group) W" U }) e9 e2 u
Private linear As NXOpen.BlockStyler.LinearDimension ' Block type: Linear Dim4 U$ l9 _% i# W& z: e
Private string01 As NXOpen.BlockStyler.StringBlock ' Block type: String; m# C% n' e) O6 o: ]' ?" J
Private string02 As NXOpen.BlockStyler.StringBlock ' Block type: String1 R6 T+ R+ H7 H( O+ P, k' X3 |
Private string03 As NXOpen.BlockStyler.StringBlock ' Block type: String
+ h* f7 ~( I9 t5 F7 u! ?& ~7 z Private string06 As NXOpen.BlockStyler.StringBlock ' Block type: String$ E: t) k8 Q1 N3 q. K7 I
Private string04 As NXOpen.BlockStyler.StringBlock ' Block type: String+ r! E4 |7 @) O$ P4 C. `' H+ U
Private string05 As NXOpen.BlockStyler.StringBlock ' Block type: String
( N* A5 R) u" Z" i Private string07 As NXOpen.BlockStyler.StringBlock ' Block type: String1 C' H0 @* s3 |% W! S& P
Private string09 As NXOpen.BlockStyler.StringBlock ' Block type: String2 z0 V3 Y) Q' t! n* M- v) ^
Private string010 As NXOpen.BlockStyler.StringBlock ' Block type: String
7 G/ Y n' R* O7 J5 D! h Private string011 As NXOpen.BlockStyler.StringBlock ' Block type: String
( h) Q! I& k" K* Z/ f Private string012 As NXOpen.BlockStyler.StringBlock ' Block type: String7 T% D; j& E; W3 O$ G9 E6 f
Private list_box0 As NXOpen.BlockStyler.ListBox ' Block type: List Box
. {2 |2 k2 k& b Public Shared ReadOnly SnapPointTypesOnByDefault_UserDefined As Integer = 1: u1 w$ M6 z+ I/ O) D
Public Shared ReadOnly SnapPointTypesOnByDefault_Inferred As Integer = 2
3 D9 G; ]4 ]7 q) _8 J% R Public Shared ReadOnly SnapPointTypesOnByDefault_ScreenPosition As Integer = 4
( t8 X! y# _( {- I' a Public Shared ReadOnly SnapPointTypesOnByDefault_EndPoint As Integer = 8
" H7 J" t3 e0 }9 l7 g7 z/ b Public Shared ReadOnly SnapPointTypesOnByDefault_MidPoint As Integer = 16' G* s0 z; L9 S+ t4 N9 N( B E
Public Shared ReadOnly SnapPointTypesOnByDefault_ControlPoint As Integer = 32
3 Y& y& b! r8 }9 u1 O* u2 j Public Shared ReadOnly SnapPointTypesOnByDefault_Intersection As Integer = 64/ u l8 R6 N) j6 i; I
Public Shared ReadOnly SnapPointTypesOnByDefault_ArcCenter As Integer = 128! r& o7 V( D9 {9 J/ a, n1 x9 q
Public Shared ReadOnly SnapPointTypesOnByDefault_QuadrantPoint As Integer = 256
. Z4 Y$ C% { r c/ o. @ Public Shared ReadOnly SnapPointTypesOnByDefault_ExistingPoint As Integer = 512
3 L _7 f3 h0 u3 M Public Shared ReadOnly SnapPointTypesOnByDefault_PointonCurve As Integer = 1024
1 g. ^$ b. ~: ~ Public Shared ReadOnly SnapPointTypesOnByDefault_PointonSurface As Integer = 20482 P& ]+ B! A, f2 `# }: g
Public Shared ReadOnly SnapPointTypesOnByDefault_PointConstructor As Integer = 40966 K- v _- {: F' {. ?
Public Shared ReadOnly SnapPointTypesOnByDefault_TwocurveIntersection As Integer = 8192
) U* Y5 I6 Z% l$ U$ E" N. B Public Shared ReadOnly SnapPointTypesOnByDefault_TangentPoint As Integer = 16384: _% ~9 g2 ^6 z# S+ R, B. v: Q
Public Shared ReadOnly SnapPointTypesOnByDefault_Poles As Integer = 327687 O% u7 S# M9 Y: v/ {* l3 p- u5 \
Public Shared ReadOnly SnapPointTypesOnByDefault_BoundedGridPoint As Integer = 65536
# B0 z% [7 [' ~- f5 R6 ?
4 ~! S. Y3 n' v# K/ o/ g" ^2 n3 L#Region "Block Styler Dialog Designer generator code"
& R2 Q- k4 l( p) v4 D. } '------------------------------------------------------------------------------* O0 A+ z! W. S: A) |. \& X% E. l
'Constructor for NX Styler class: y ]* r, `& A1 S
'------------------------------------------------------------------------------2 Q8 w9 J9 W% s
Public Sub New()
& X$ V0 R( S' f9 X0 F" u1 K# N Try4 r1 p5 N3 I; K% D4 B0 @
! u& Y4 q& p; r6 t/ o2 c theSession = Session.GetSession()
. F4 d" `$ p# V- C9 x H7 C theUI = UI.GetUI()# I- c7 z8 q- {( {) N+ N
theDlxFileName = "D:\LIS_ug\TOOL1\PRESS-A01.dlx"5 B. P; j3 t. t* R' h& B. e! [
theDialog = theUI.CreateDialog(theDlxFileName)1 K) k! c8 R$ |# l! K
theDialog.AddApplyHandler(AddressOf apply_cb)- y. |% l% L, g* P5 ]2 P
theDialog.AddOkHandler(AddressOf ok_cb)" d) O% z) {' k9 `4 H
theDialog.AddUpdateHandler(AddressOf update_cb)3 w0 ~7 I, l5 j7 i
theDialog.AddInitializeHandler(AddressOf initialize_cb)
. D' [, T8 t4 \3 Y9 V theDialog.AddEnableOKButtonHandler(AddressOf enableOKButton_cb)& N# `: p4 F7 Z$ r/ x/ T* H
theDialog.AddDialogShownHandler(AddressOf dialogShown_cb)
- k( R; w, }4 `6 }( k6 P8 Y: [% U' X
Catch ex As Exception
5 l9 n" ^6 X# r3 I C
, c% V/ N1 n- @ m# X: H Throw ex
, Y* _' n8 C e End Try
5 I- N+ b& K S End Sub% j3 v1 |& E& L, ?0 K1 M# f5 C+ c+ }
#End Region5 C- n: R1 j. b
3 F3 J1 G- W+ U' R
Public Shared Sub Main()
1 b) X; x1 M' q/ k! l3 B, v Dim thepress As press = Nothing# r( i M4 S9 M
Try6 o8 ?6 A: u8 t. S
' x/ {6 n) K) l5 G
thepress = New press()& Z ?$ P4 E& ?, ?$ B! y; o9 D
thepress.Show(), ~% ~- t# \) t) z, D; j9 m' ?
4 X; ?! V8 e5 s, ?) F0 M5 x Catch ex As Exception
8 o4 w/ C% _, Z. I
, g) [/ }# d/ p+ D8 S( d; _ theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
5 M, L$ B- M) [& ^0 p Finally9 v2 D% B, r- g& W% w2 Y/ t, X
If thepress IsNot Nothing Then% i9 B8 Z l# z, O) ?
thepress.Dispose(). ^5 y/ \; `& W( C" p1 N! e& a
thepress = Nothing8 f c" \% Q, j* ~
End If. J7 N! o; A& B' b/ K2 o
End Try
4 ^( ?( h ?6 o6 R End Sub( G. o9 k1 p' C5 v& D \; |
Public Shared Function GetUnloadOption(ByVal arg As String) As Integer
3 P* @( X; Y7 a- q 'Return CType(Session.LibraryUnloadOption.Explicitly, Integer)0 M3 D: V8 {6 N4 a& B: n
Return CType(Session.LibraryUnloadOption.Immediately, Integer)2 w0 z; m5 F, A T
' Return CType(Session.LibraryUnloadOption.AtTermination, Integer)
' R; t, d2 C$ O6 b* c End Function3 D9 f; J! I, g D b% X6 [
Public Shared Sub UnloadLibrary(ByVal arg As String)
+ ~: n3 X" q2 Z8 o6 T! F: ?3 k Try
7 c- k* F" u: I
/ y7 S" t9 ~0 C8 q6 U9 t( R& e1 }+ U3 a+ K O
Catch ex As Exception" c% m8 X, J- A i
$ k7 F$ A9 ~) _ theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
' F, f) C- z3 K8 x, E! j End Try
7 b d$ ~3 \8 H7 @2 p End Sub+ A: _, V; d7 |! W8 x0 Z
* d3 ?1 b! w4 B: S1 a4 T* } '------------------------------------------------------------------------------
9 Z- A, N4 M5 b( l: K 'This method shows the dialog on the screen" L! R: c7 P* b2 {9 V3 Q
'------------------------------------------------------------------------------
! \; g3 F. v R4 n X% f7 W8 X Public Sub Show()# z; Q o; { v3 ]1 Z8 h# q! X8 C
Try
* H7 }0 ?; m" ]. X; z# Y
4 I. l+ I( r( p& ^% {' ^ theDialog.Show()
6 [; W$ r8 v0 o# o
$ o& w2 F! q$ e4 ?# `# u Catch ex As Exception
( q! s9 B% y0 X: v1 f7 q1 j( t6 U! y3 f% _. u4 J& {
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
4 J8 A1 d7 d# \3 [8 U% V2 e End Try0 F( f7 S; c9 n+ _( l: a% M8 E+ @
End Sub
1 _' a: y& r3 w4 V9 { V( ?7 O7 g- Y2 n( f3 z8 L' l! `1 O
'------------------------------------------------------------------------------( N3 M- \, i5 M' L& A0 v0 ~
'Method Name: Dispose9 ]! g/ }5 j9 U$ _0 D
'------------------------------------------------------------------------------
i3 e% K4 s5 v! W Public Sub Dispose()
( |" B1 b5 E: W+ h9 s0 |9 a If theDialog IsNot Nothing Then8 q3 W9 D) s2 y# {
theDialog.Dispose()
* w. g9 f' ]5 V& ^! F theDialog = Nothing& L3 }; l z$ ?; v2 \
End If
+ } z3 [1 m- c( R! F6 u End Sub
) @( Y; f: B) S$ m1 H, y# S# o# r6 E
* v9 b2 L- s' _7 l+ O
'------------------------------------------------------------------------------
# U- U1 T3 B" r7 U8 v' L# k 'Callback Name: initialize_cb
5 Y, {+ E5 M4 w) l* M. ? '------------------------------------------------------------------------------
6 o/ F: V# O8 v5 }7 M: M8 D: W% x+ _ Public Sub initialize_cb()0 b% {8 A1 x9 p- ~3 _
Try* l6 y3 \0 z' ?. |) x4 |- C
0 J' V4 u s! @$ |. s0 q group0 = CType(theDialog.TopBlock.FindBlock("group0"), NXOpen.BlockStyler.Group)
. ]& i* @) x; i linear = CType(theDialog.TopBlock.FindBlock("linear"), NXOpen.BlockStyler.LinearDimension)
& _2 K5 W6 H8 P( X6 z2 { string01 = CType(theDialog.TopBlock.FindBlock("string01"), NXOpen.BlockStyler.StringBlock); ]9 }" \6 ]0 N2 M- [+ ?9 \
string02 = CType(theDialog.TopBlock.FindBlock("string02"), NXOpen.BlockStyler.StringBlock)6 Q+ C" [6 r+ K2 z- T6 A0 H1 e, d4 X
string03 = CType(theDialog.TopBlock.FindBlock("string03"), NXOpen.BlockStyler.StringBlock)
6 P) @; x2 P, y5 g$ \) p5 t- |3 V1 a2 c string06 = CType(theDialog.TopBlock.FindBlock("string06"), NXOpen.BlockStyler.StringBlock)
9 U& \; f }- d9 Z. R0 e9 w string04 = CType(theDialog.TopBlock.FindBlock("string04"), NXOpen.BlockStyler.StringBlock)
8 y, c& j% M6 B# j string05 = CType(theDialog.TopBlock.FindBlock("string05"), NXOpen.BlockStyler.StringBlock)
D" G' Y$ K5 J) d( Q# x" ` y string07 = CType(theDialog.TopBlock.FindBlock("string07"), NXOpen.BlockStyler.StringBlock)
_: H G& D- }% v string09 = CType(theDialog.TopBlock.FindBlock("string09"), NXOpen.BlockStyler.StringBlock)4 }& j- P+ I( \# d. w+ K/ u9 o
string010 = CType(theDialog.TopBlock.FindBlock("string010"), NXOpen.BlockStyler.StringBlock)
# h5 q$ t' [% K$ E% u1 A string011 = CType(theDialog.TopBlock.FindBlock("string011"), NXOpen.BlockStyler.StringBlock)
5 c9 }4 `. W' N0 A% G string012 = CType(theDialog.TopBlock.FindBlock("string012"), NXOpen.BlockStyler.StringBlock)% l1 W! _0 V7 q3 T; |7 v) r- ]4 b# P
list_box0 = CType(theDialog.TopBlock.FindBlock("list_box0"), NXOpen.BlockStyler.ListBox)
; Y$ a- J( m, Q7 h2 D
" _2 u- J, H, _; V* d: j7 ^/ p2 A3 a/ T8 W/ T
- r3 P0 s t$ [0 j
Catch ex As Exception. i4 p7 K U6 L) Y% ]( ^
4 r! {; s0 o; g
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
" Z% e! r: y# R* z- p( Q End Try
& l/ ^# X; p2 L! _6 h. m End Sub
+ Q: j4 ]/ l3 h+ P S' v4 ]
5 f/ I" a9 ]) ~. |$ q+ T5 } '------------------------------------------------------------------------------" e( d, T( E/ j
'Callback Name: dialogShown_cb
5 `5 J* P5 C5 ^7 Y& b/ L/ K '------------------------------------------------------------------------------
* W% v2 M" U4 [+ n2 W/ G5 S7 M Public Sub dialogShown_cb()
% R, q6 Y0 |. X2 j- K) N) x Try
/ A. R; Z; f$ k! [
% X4 K- Q/ g' F" N
, {- `* E! j0 C5 u. e0 ` Catch ex As Exception5 T0 o* d8 B% M/ N, H/ s+ T
" x5 N! z. k) A1 m h' s- a
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
7 z1 F: h* n( R Q R$ N7 R* a$ V End Try: M* l) B4 @/ [ j4 v' c: _
End Sub
" W1 |: K* B H3 q/ C
- D5 n' [/ K, x) D0 J2 l8 w '------------------------------------------------------------------------------& `$ P/ v! n- g4 ~( W; W6 \9 j
'Callback Name: apply_cb( q u! K3 Q& T0 `
'------------------------------------------------------------------------------
+ ~6 s" a$ i4 r Public Function apply_cb() As Integer
( G- L/ m8 a( L6 E& }( b) k Dim errorCode As Integer = 0. Y y, t9 w) r9 T& b& l% v! }
Try1 b( U" j% a0 F6 a$ D
3 F0 K+ O2 i- d2 e) h
! Q5 o+ C2 U3 a3 M Catch ex As Exception8 ?3 I8 y7 V$ P
1 S4 d( V. y( m errorCode = 1
' i$ U) U' `$ a! T$ l5 B1 t theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)3 B, N6 t& s# G. M
End Try
( x+ m) y1 u5 j& A5 ~' p apply_cb = errorCode
' V8 k& ~* z* d! O# H End Function
. T8 m: n. f3 x. r+ }4 [
8 V8 }" J' Z$ ^. ] '------------------------------------------------------------------------------' K% D5 b8 X- w0 k/ j2 P$ `
'Callback Name: update_cb, G0 Y# ` z" b! e+ K1 k
'------------------------------------------------------------------------------
( e8 F. Y/ \3 M; k& d Public Function update_cb(ByVal block As NXOpen.BlockStyler.UIBlock) As Integer- l4 `2 v" d. V" e
Try
0 Y) b- J" O" F$ Y4 t) v
* M' ?% H# b8 E, }2 V# n Dim num As Single = CType(linear.Value, Single) '转浮点数' q; g4 [/ I) u0 ] {5 l
Dim aa3 As Decimal = Math.Round((num * string01.Value * string02.Value * 0.001), 3) '3位小数
a/ H7 O# w$ q6 [ string03.Value = aa3% I. b! u8 t* x5 H+ P, U
Dim aa4 As Decimal = Math.Round((string03.Value * 0.8), 3) '3位小数" S% B$ n7 j1 R
string04.Value = aa4
$ \ b9 Y1 q5 ^+ {1 E7 J Dim aa5 As Decimal = Math.Round((string04.Value * 1 / 6), 3) '3位小数
9 q6 E/ |! ?6 z3 \7 r1 R) f string05.Value = aa5
0 [$ B* }4 w% ` Dim aa6 As Decimal = Math.Round((string03.Value * 0.06), 3) '3位小数
3 F" k4 w2 \3 ~ string06.Value = aa6
/ _- h( o9 t: g4 |# E$ Q$ j
5 ?5 Y( Q5 z0 `5 Q0 O3 @: I& ~; E Dim a3 As Single = CType(string03.Value, Single) '转浮点数
* k+ S5 t# V9 u8 n& M Dim a4 As Single = CType(string04.Value, Single)% I7 t$ x6 u8 d0 W7 Z& o7 ]
Dim a5 As Single = CType(string05.Value, Single)* n$ X8 j+ L% \% _2 e
Dim a6 As Single = CType(string06.Value, Single)" {& E5 [$ z+ }4 S! p, x
! F* \8 ?$ H! R$ e8 X, e
Dim b3 As Decimal = Math.Round(a3, 3) '3位小数- B4 E2 d! y$ x4 |
Dim b4 As Decimal = Math.Round(a4, 3); Q, n$ s" X; t8 q* j( F' z; j
Dim b5 As Decimal = Math.Round(a5, 3)
/ Q: ?& K8 k9 x+ H& d6 O Dim b6 As Decimal = Math.Round(a6, 3): J7 d! T& b. H/ v1 a
8 ?; W, x! G' H2 ^" X$ g' g
: d( q% W" R* L0 D5 r
Dim d1 As Decimal = Math.Round((b3 * 1.3 + b6 * 1.3), 3) '2位小数# _& u2 _4 [' h' D a: }# C
Dim d2 As Decimal = Math.Round((b4 * 1.3 + b5 * 1.3), 3)3 r$ K+ k* V) z4 C# N
4 I4 `- t! {# v$ ~
string07.Value = d1
' h: x3 o9 ^. |8 _2 \2 X string09.Value = d2( F& r# G7 [7 ]4 J8 [% r7 h
) s& }2 N+ P* K- h g2 F
b; g5 a- l3 @% a2 X: } Dim a As Single = CType(string010.Value, Single) '转浮点数( |0 ]* Z4 B) N+ S# K# P
Dim b As Single = CType(string011.Value, Single)
3 ^( b ^& Z; w( U7 A% y4 F string012.Value = a + b. M0 W) J4 N6 t! h' S* l3 {( O2 g
1 }$ u" q O: v( U3 B1 j0 e/ |2 g: b% ]( ~: |) v: N
+ h# N- F) v: Y/ q0 N1 `+ |- {/ q3 a) O/ h
# _- q$ }# ` I6 \1 q6 B8 F2 _ Catch ex As Exception( B$ J: o0 f Q/ R! g
. \$ G( y% ~3 |+ n& W. s! g theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)8 {4 m: v3 H- Y$ ^7 Z/ K5 X1 L
End Try
. _8 s. r1 y6 {" }2 h8 d update_cb = 0! Z: V, o* q j4 e0 j7 X! W' o+ m) f
End Function- H5 H/ |% f7 x: z+ K
) ~8 h0 r* k# M '------------------------------------------------------------------------------
) a( h' N' D h+ \, S2 C 'Callback Name: ok_cb
6 @. |" H' N! q, v '------------------------------------------------------------------------------' s( o1 S6 V6 _" ?, I# Z/ b7 }
Public Function ok_cb() As Integer
6 a8 I! h$ Q2 b Dim errorCode As Integer = 0* R4 Q, ^; V$ k
Try% x2 R( X& @6 L0 x+ J
6 W( Z( e! S- G0 H. `+ F: [4 j errorCode = apply_cb(). l8 L+ I3 K }: e" h
' C! N6 \" }1 f4 {- M- j0 F5 j2 j" A
Catch ex As Exception4 @) g) Y7 S$ T+ t3 T& a# }- o
: t" m: O" M0 j5 K5 w. P errorCode = 1+ d/ K* K, n0 A) g! C" k4 j: z; u
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
; @- d* H6 u6 {: q: p7 S5 Q) K End Try
: E! l5 H6 O M ok_cb = errorCode$ @) W+ a7 |( Q2 h! [, |
End Function
, N5 e4 W6 ]6 o0 k& d3 N
9 P$ @( u+ \; G8 k) G7 U '------------------------------------------------------------------------------, X) T5 M1 b( F+ W, h1 g" P: F2 |& v
'Callback Name: enableOKButton_cb) j' i& ^; @) Z4 m% Y
'------------------------------------------------------------------------------" X3 W- v: y# U$ O/ ]' N0 i
Public Function enableOKButton_cb() As Boolean
0 S+ H9 n2 Z2 s9 x0 b2 a' I enableOKButton_cb = True
~9 ]( H1 G- ^4 U9 q& ]3 a( c1 N Try
; _' u0 i7 s d% T) h% E' T% D* b1 K, ]: H% T( t
1 W: N6 V! r* X( K5 O
Catch ex As Exception
$ ?3 a4 [" _+ Z/ f; K2 [7 X4 H4 n$ j% M2 e# `
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)) }1 G# W0 n' ]: q
End Try+ f8 S+ G9 N6 k$ F3 f9 Y+ T
End Function
, y6 g a, L1 Y0 i. g9 s1 v% ?8 U% Z# S" j9 w
( d0 I" F6 K' ?/ |
% `6 ?* [; o- v" m9 t3 i; b
'------------------------------------------------------------------------------' z3 W' m& A; b4 ?& R
'Function Name: GetBlockProperties
+ @- h- C W# t6 x' O; \3 l# l 'Returns the propertylist of the specified BlockID
0 v5 D9 w8 K+ T; P2 u/ S '------------------------------------------------------------------------------
4 A, x: t* T/ n Public Function GetBlockProperties(ByVal blockID As String) As PropertyList6 R/ Z5 Q* Q: T3 s
GetBlockProperties = Nothing( J- s1 t0 ~9 B* i* r
Try" H6 K) v1 I1 k) X1 V2 D
+ a5 [" J% ?9 e2 Y% T GetBlockProperties = theDialog.GetBlockProperties(blockID)" o: J- ?- `+ N
. }4 H" n7 v4 X* P8 |* C Catch ex As Exception6 U: _4 A' c8 N Z: t4 {
% s9 _: l* i; H3 T& y8 R1 ` theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)0 ?) t$ h8 t( J" H$ a* q
End Try% Z7 N8 h( A$ S& f
End Function, x. ~; G9 @; H5 Z7 s* z
' E- l) u u- H2 OEnd Class/ E8 n% U$ a& m/ v
3 Q; E- I# c4 r; Z# {1 m& ^) R
( _) V7 \" F! x; R) A; n0 W |
|