线型加载程序 Dim linetypeName As String linetypeName = "center" ' 从acad.lin文件中加载 "CENTER"线型 On Error Resume Next ' 捕获任何出错信息 ThisDrawing.Linetypes.Load linetypeName, "acad.lin" ' 如果该名称已经存在,则提醒用户 If Err.Number = -2145386405 Then MsgBox "名称为“" & linetypeName & "”的线型已经存在。", , "明经通道VBA线型加载示例" End If 现在的问题是将线型加载到图层,程序不通过。 Set objLayer = .Layers.Item(jj) With objLayer Select Case objLayerArray(jj) Case "中心线" .Linetype = "Center" Case "虚线" .Layers.Linetypes = "Dashed" End Select End With 从理论讲是可行的,但实际操作,程序不通过,原因何在??? |