路边 发表于 2006-4-8 08:45:00

怎样定义字体???

<P>Sub sy()<BR>&nbsp;&nbsp;&nbsp;&nbsp;Dim TextObj As AcadText '定义文字对象变量<BR>&nbsp;&nbsp;&nbsp;&nbsp;Dim TextString As String '定义字符串变量<BR>&nbsp;&nbsp;&nbsp;&nbsp;Dim InsPnt(0 To 2) As Double '定义文字插入点数组变量<BR>&nbsp;&nbsp;&nbsp;&nbsp;Dim Height As Double '定义文字高度变量<BR>&nbsp;&nbsp;&nbsp;&nbsp;TextString = "试验"'</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;'指定文字插入点位置和文字高度<BR>&nbsp;&nbsp;&nbsp;&nbsp;InsPnt(0) = 100: InsPnt(1) = 100: InsPnt(2) = 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;Height = 15<BR>&nbsp;&nbsp;&nbsp;'在模型空间创建文字对象<BR>&nbsp;&nbsp;&nbsp;&nbsp;Set TextObj = ThisDrawing.ModelSpace.AddText(TextString, InsPnt, Height)<BR>&nbsp;&nbsp;&nbsp;&nbsp;TextObj.Color = acGreen '指定文字对象的颜色为绿色<BR>&nbsp;&nbsp;&nbsp;&nbsp;ZoomAll '缩放视图<BR>&nbsp;&nbsp;&nbsp;&nbsp;Unload Me '关闭窗体</P>
<P>我怎样定义"试验"'为宋体啊??请帮忙!!<BR></P>

雪山飞狐_lzh 发表于 2006-4-10 11:30:00

<P>搜索一下吧,很多这样的帖子</P>

路边 发表于 2006-4-10 15:20:00

是么??

路边 发表于 2006-4-10 15:23:00

给发一个贴吧!!谢谢!!!
页: [1]
查看完整版本: 怎样定义字体???