arubus1977
2009-07-15, 10:11 AM
Hi, can anyone help.....
I am trying to create a new text style using visual lisp, the new text style is to have the arial true type font, here is the code:
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq styleCol (vla-get-textstyles doc))
(setq myStyle (vla-add styleCol "theStyle"))
(vla-setfont myStyle "ARIAL.TTF" :vlax-False :vlax-False 0 32)
I get the error 'Automation Error. Invalid input'. The problem being the vla-setfont method, but it looks fine according to the vlisp help. I have no problem creating a new text style using an .shx font and the vla-put-fontfile method but cannot use ttf's???
Many Thanks
I am trying to create a new text style using visual lisp, the new text style is to have the arial true type font, here is the code:
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq styleCol (vla-get-textstyles doc))
(setq myStyle (vla-add styleCol "theStyle"))
(vla-setfont myStyle "ARIAL.TTF" :vlax-False :vlax-False 0 32)
I get the error 'Automation Error. Invalid input'. The problem being the vla-setfont method, but it looks fine according to the vlisp help. I have no problem creating a new text style using an .shx font and the vla-put-fontfile method but cannot use ttf's???
Many Thanks