How to create TextObject with commandscript?

Hi,

I’m trying to figure out how to create TextObject with a command script file. (Tools->Commands->Read From File).

I cannot figure that out by documentation - if I type TextObject to the command line and press space, I get a GUI dialog. How do you select font, size and single stroke via the text command file?

The target is mass volume laser cutting files, and manual GUI clicking is not a real option.
I also need to put the text on different layer automatically, so it will be engraved instead cutting.

Creating geometry works perfectly though, only this text is an issue.

Also its not feasible to change to another scripting method, the source of the data is old FORTRAN code, and we’ll not fix something that is not broken… So if the TextObject cannot work we’ll probably use Hershey fonts instead.

//HS

Hello - use the dash version of any command to bypass the dialog boxes:

-TextObject

-Pascal

OK that helped to get further, but how do you input the attributes like Height and Font?
Is this documented somewhere?

Hello- use MacroEditor to build the macro - it is the only practical way for commands with a ton of command line input - as you go, you can see what the command line offers and fill in the relevant options-

-_TextObject _Font=Sitka _Italic=_No "Pingpong" 0

for example.

more info here: https://docs.mcneel.com/rhino/6/help/en-us/index.htm#information/rhinoscripting.htm?

-Pascal

Thanks, I got it working!

Any recommendations for a well-working single-stroke font?

Hello - there are the mec-soft ones, I cannot remember if we install these or not, by default but:

-Pascal

1 Like