It seems that the Rhino.TextObjectText function called from a VB Script removes all curly braces “{” and “}” from the text to be written into a text object. It works from the UI though. I have tried several ways of escaping the curly braces e.g."{" but it did not work, and I could not find any documentation on this.
Here is the script which I used for testing (The string is intended to be displayed as barcode with Code 128 font):
Option Explicit
Call Main()
Sub Main()
Dim strText, arrPoint, dblHeight, strObj
arrPoint = Array(0, 0, 0)
dblHeight = 10
strText = “Auftrag”
strObj = Rhino.AddText(strText, arrPoint, dblHeight)
strText = “Ò4#{Í-18TS-CSC8-1iÓ”
Rhino.TextObjectText strObj, strText
End Sub
The curly brace gets removed and the barcode doesn’t work.
Interesting, it does not work on my system.
I have Rhino Version 6 SR30
(6.30.20288.16411, 14.10.2020)
Also tried it on Rhino 7 WIP and it showed the same problem.