I am looking to create a script that will change the font of a selected list of text and then explode the text so that it can be used to engrave on a cnc mill.
I am doing this so that the text is editable until right before I use it to engrave. Just in case it was labeled wrong or if we make an updated version it’s easy for me to edit the text then explode it. Original text would be backed up on a previous layer.
I am doing this because I would need to edit/explode the text on hundreds of parts at a time.
I tried converting my text to a text object but that didn’t work out for me so I thought this may be simpler.
Completely new to scripting and have no VB knowledge so hang there with me.
Dim obj_list, strObject, obj, cmd, text
obj_list = Rhino.GetObjects("Select text to convert", 512, True, True) If Not IsArray(obj_list) Then Exit Sub For Each obj In obj_list If Rhino.IsText(obj) Then strObject = obj 'text = Rhino.TextObjectText(strObject) 'msgbox(text) 'debug check Rhino.TextObjectFont strObject, "Arial" cmd = "_explode" Call rhino.command(cmd, True) End If Next
Rhino.AddAlias “FontTest”, “_NoEcho _-RunScript (FontTest)”
Unfortunately, this doesn’t change the font and then it launches the explode command instead of exploding the current “obj”.
Any and all help would be greatly appreciated.