如何先定义一个层,然后定义这个层的线形
<P>我在书上调试一段程序,想用VBA制定一个中心线层.</P><P>Public Sub Centlayer()<BR>On Error Resume Next<BR>Dim CenterLayer As AcadLayer<BR>Dim layerCollection As AcadLayers<BR>Dim Center As AcadLineType</P>
<P>Set layerCollection = ThisDrawing.Layers<BR>Set CenterLayer = layerCollection.Add("center")<BR><FONT color=#ff1111>Set CenterLayer.Linetype = "Center"</FONT></P>
<P>End Sub</P>
<P>当我写到红色的那句话是,就不知道怎么写了,帮助文件里也找不到lintype的更详细的内容,恳请各位高手指点</P> <FONT color=#ff1111>CenterLayer.Linetype = "Center"</FONT> 谢谢您!不过还是没用,是不是要先手动加载啊! 的确要先加载,ThisDrawing.Linetypes.Load "CENTER2", "acad.lin" <P><A href="http://www.mccad.net/object/acad2004/idh_load.htm" target="_blank" ></A> </P>http://www.mccad.net/object/acad2004/idh_load.htm 谢谢斑竹!小弟初学VBA以后不明白的地方还请各位多多指点
页:
[1]