求助:怎么样通过VB在CAD添加图层呢?
求助:怎么样通过VB在CAD添加图层呢?谢谢!! 先把vb与cad建立连接
Set acadApp = GetObject(, "autocad.application.15")<BR>If Err Then<BR> Err.Clear<BR> Set acadApp = CreateObject("autocad.application.15")<BR>If Err Then<BR> Err.Clear<BR> Set acadApp = GetObject(, "autocad.application.16")<BR>If Err Then<BR> Err.Clear<BR> Set acadApp = CreateObject("autocad.application.16")<BR>If Err Then<BR> MsgBox Err.Description<BR>Exit Sub<BR>End If<BR>End If<BR>End If<BR>End If
再建立图层。 这个我已经实现了,那接着怎么办呢? Dim LayObj As AcadLayer
<BR>Set LayObj = AcadApp.ActiveDocument.Layers.Add("test")
页:
[1]