get user input
get user input
(OP)
Code:
Dim initial As String = "enter name"
Public Sub dialogShown_cb()
Try
string0.GetProperties.SetString("Value", initial)
string01.GetProperties.SetString("Value", "")
End Try
End Sub
Public Function apply_cb() As Integer
Try
Dim UserInputString As String
UserInputString = string0.GetProperties.GetString(initial)
string01.GetProperties.SetString("Value", UserInputString)
End Try
End Function
Error: Invalid property name for the block... .GetString(String propertyName)at appy_cb()...
Anybody knows what's wrong with the above code? I'm guessing is something simple but I can't see what it is!
Dim initial As String = "enter name"
Public Sub dialogShown_cb()
Try
string0.GetProperties.SetString("Value", initial)
string01.GetProperties.SetString("Value", "")
End Try
End Sub
Public Function apply_cb() As Integer
Try
Dim UserInputString As String
UserInputString = string0.GetProperties.GetString(initial)
string01.GetProperties.SetString("Value", UserInputString)
End Try
End Function
Error: Invalid property name for the block... .GetString(String propertyName)at appy_cb()...
Anybody knows what's wrong with the above code? I'm guessing is something simple but I can't see what it is!





RE: get user input
Public Function update_cb(ByVal block As NXOpen.BlockStyler.UIBlock) As Integer
Try
If block Is string0 Then
Dim UserInputString As String
UserInputString = string0.GetProperties.GetString("Value")
string01.GetProperties.SetString("Value", UserInputString)
string0.GetProperties.SetString("Value", "Enter Name")
ElseIf block Is string01 Then
'---- Enter your code here -----
End If
Catch ex As Exception
End Try
update_cb = 0
End Function
Hope this helps
Frank Swinkels
RE: get user input
Can I further ask if you know the attribute for making the string visible/hidden?
I was looking to find the state of the string and change it.. but nothing similar appears in the library.
RE: get user input
string01.GetProperties.SetLogical("Show", False)
This would hide all string01. Simply use
string01.GetProperties.SetLogical("Show", True)
to again show it.
Is this what you were looking for?
Frank Swinkels