×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

get user input

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!

RE: get user input

Instead of in the apply_cb function use the update_cb function which needs to be

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

(OP)
Thank you!

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

There is a show method which for say string0 is

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources