ExitSub
EndIf
EndIf
AcadApp.Visible=True
EndSub
PublicSubAcadQuit()
'释放内存空间
OnErrorResumeNext
AcadApp.Quit
SetAcadApp=Nothing
EndSub
PublicSubDrawTxt(xAsDouble,yAsDouble,HAsDouble,FactrAsDouble,angleAsDouble,tXtstrAsString)'单行文本
DimtxtobjAsAcadText
DimP(0To2)AsDouble
P(0)=x:P(1)=y:P(2)=0
Settxtobj=AcadApp.ActiveDocument.ModelSpace.AddText(tXtstr,P,H)
txtobj.ScaleFactor=Factr
txtobj.Rotation=angle*3.1415926/180
EndSub
本文提供简单的实现方法,借以抛砖引玉。其中不当之处希望行家给以指正