reading dwg file external to autocad
reading dwg file external to autocad
(OP)
Is there any way i can programmatically read autocad file .dwg and extract information file attributes, blocks, x-ref etc without opening autocad application.
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
reading dwg file external to autocad
|
RE: reading dwg file external to autocad
DXF is easy.
RE: reading dwg file external to autocad
RE: reading dwg file external to autocad
-------------------------------------
Private Sub CmdQueryDwg_Click()
Dim xDoc As Object 'AxDbDocument
Dim dwgFile As String
'''''''''''''''''''''''''''''''''''''''
dwgFile = txtOpenPath.Text
If dwgFile <> "" Then
Set xDoc = AcadApplication.GetInterfaceObject("ObjectDBX.AxDbDocument")
xDoc.Open dwgFile
ListBox1.Clear
If OptLayers.Value = True Then
Dim Layer As AcadLayer
For Each Layer In xDoc.Layers
ListBox1.AddItem (Layer.Name)
Next Layer
Else
Dim Block As AcadBlock
For Each Block In xDoc.Blocks
If ChkFilterBlks.Value = False Then
ListBox1.AddItem (Block.Name)
Else
If Left$(Block.Name, 1) <> "*" And _
Left$(Block.Name, 2) <> "A$" Then
ListBox1.AddItem (Block.Name)
End If
End If
Next Block
End If
End If
End Sub
"Everybody is ignorant, only on different subjects." — Will Rogers
RE: reading dwg file external to autocad
http://www.cadmin.com/VBA_for_ADT/ObjectDBX.htm
"Everybody is ignorant, only on different subjects." — Will Rogers