不打开cad图形的前提下如何获取图形中层的各种属性?
<p>如题!!</p><p>本人打算在不打开cad图形的前提下如何获取图形中图层的各种属性?比如图层的名字,线形,颜色等。</p><p>用objectdbx吗?请问如何实现的?</p> <p>Sub testDBX()</p><p>Dim i As Integer<br/>Dim objLayers As AcadLayers<br/>Dim oObjectDBX As Object<br/>Dim sFileName As String</p><p>Set oObjectDBX = AcadApplication.GetInterfaceObject("ObjectDBX.AxDbDocument.16")</p><p>sFileName = "c:\BRACE_89.dwg"<br/>oObjectDBX.Open sFileName</p><p>Set objLayers = oObjectDBX.Layers<br/>For i = 0 To objLayers.Count - 1<br/>MsgBox objLayers(i).Name<br/>Next i</p><p>End Sub</p> <p>谢谢<strong><font face="Verdana" color="#da2549">alin</font></strong>版主</p><p>我去试试看,有问题再请教你!!</p>
页:
[1]