- 积分
- 1028
- 明经币
- 个
- 注册时间
- 2004-7-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2005-5-7 18:00:00
|
显示全部楼层
你使用如下方法:
Public Function SetCurLinetype(ByVal LineTypeName As String, ByVal strFile As String) On Error goto hangc' trap any load errors AcadDoc.Linetypes.Load LineTypeName, strFile '"acadiso.lin" '===================================================== Dim entry As Variant, found As Boolean Dim newLineType As Variant For Each entry In AcadDoc.Linetypes If StrComp(entry.Name, LineTypeName, 1) = 0 Then Set newLineType = entry AcadDoc.ActiveLinetype = newLineType Exit For End If Next
exit function
hangc:
msgbox err End Function
调用方法:
Dim curLineType As Variant Set curLineType = AcadDoc.ActiveLinetype SetCurLinetype "acad_iso10w100 ", "acadiso.lin" |
|