cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

convert real number in string ?

SeeBear
1-Newbie

convert real number in string ?

Good morning,

i am a newbie in MC.

I am searching for a possibility to convert a "real" number into a string. (in a script of a text box)

I tried it in this way, but it failed....

Text=num2str(Inputs(0).Value)

If IsString (Text) Then

MsgBox "string"

End If

Please help....

Thanks....

Bye Rolf

1 ACCEPTED SOLUTION

Accepted Solutions
Raiko
16-Pearl
(To:SeeBear)

Hello Rolf,

try this code in e.g. a textbox.

Raiko

Sub TextBoxEvent_Exec(Inputs,Outputs)

XY=CStr(TextBox.Text)

Outputs(0).Value = XY

End Sub

View solution in original post

2 REPLIES 2
Raiko
16-Pearl
(To:SeeBear)

Hello Rolf,

try this code in e.g. a textbox.

Raiko

Sub TextBoxEvent_Exec(Inputs,Outputs)

XY=CStr(TextBox.Text)

Outputs(0).Value = XY

End Sub

SeeBear
1-Newbie
(To:Raiko)

Hej Raiko,

thank you very much.... Works fine now!!! That help´s me a lot!!!

Have a nice day...

Rolf

Top Tags