Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4171

Curly braces are removed from text set with Rhino.TextObjectText using VB Script

$
0
0

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.

6 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 4171

Latest Images

Trending Articles



Latest Images