Add spaces in Input String

Hi,

I'm using a small recorded journal to add text in Custom symbols.
I have to input a text string using input box,
But is there any way to add spaces into the string.

Example input String: G67000101955501011100
Output 1: G670001019555 01 01 1 100
Output 2: G6 - 7000101955501011100

You can use the string methods to manipulate string values. Below is one possible way to do this:

Option Strict Off
Imports NXOpen

Module Module61
Sub Main()

Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim lw As ListingWindow = theSession.ListingWindow
lw.Open()

Dim targetString As String = "G67000101955501011100"

lw.WriteLine("input string: " & targetString)

Dim stringParts(4) As String
stringParts(0) = targetString.Substring(0, 13)
stringParts(1) = targetString.Substring(13, 2)
stringParts(2) = targetString.Substring(15, 2)
stringParts(3) = targetString.Substring(17, 1)
stringParts(4) = targetString.Substring(18)

lw.WriteLine("string with spaces added: " & String.Join(" ", stringParts))

lw.Close()
End Sub

End Module