0 Members and 1 Guest are viewing this topic.
I dont have a LISP version, but I have a vba routine that will do it. It can be called from a script as well
Option ExplicitPublic Sub ChangeTextToRomans() Dim objSelected As Object Dim objTxt As AcadText Dim objstyle As AcadTextStyle Dim objLayer As AcadLayer Dim objSelSet As AcadSelectionSet Dim intAnswer As Integer On Error GoTo ErrControlSet objstyle = ThisDrawing.TextStyles.Add("ROMANS")objstyle.fontFile = "romans.shx"objstyle.Width = 1# Set objSelSet = ThisDrawing.SelectionSets.Add("Text") objSelSet.Select acSelectionSetAll For Each objSelected In objSelSet If TypeOf objSelected Is AcadText Then Set objTxt = objSelected If UCase(objTxt.StyleName) <> "ROMANS" Then objTxt.StyleName = "ROMANS" objTxt.ScaleFactor = 1# Else objTxt.ScaleFactor = 1# End If End If Next ThisDrawing.SelectionSets.Item("Text").Delete ThisDrawing.Application.UpdateExit_Here: Exit SubErrControl: MsgBox Err.DescriptionEnd Sub
open "your dwg name" (command "-vbarun" "E:/TextToRomans.dvb!ThisDrawing.ChangeTextToRomans") qsave close
Dim objstyle As AcadTextStyleSet objstyle = ThisDrawing.TextStyles.Add("Arial")objstyle.fontFile = "arial.ttf"objstyle.Width = 1#