Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I get Drawing Properties from Outside the drawing

Status
Not open for further replies.

jrice174

Civil/Environmental
Nov 8, 2004
129
In AutoCAD, if you go to File and then Drawing Properties, you get a Properties dialog box. The info on the Summany tab is what I'm trying to capture.
Can I get that to appear in a Window XP window?
Can I get this info using VBA without opening AutoCAD?
Can I get this using VBA if I open the drawing?

Thanks
 
Replies continue below

Recommended for you

Need ref to lib....

Sub DPTest(ByVal sFilePath As String)
Dim oDP As DWGPROPSXLib.Properties
Dim I As Integer

Set oDP = New DWGPROPSXLib.Properties
oDP.Load sFilePath
Debug.Print "File: " & sFilePath
Debug.Print "Author: " & oDP.Author
Debug.Print "Comments: " & oDP.Comments
Debug.Print "Created: " & oDP.Created
Debug.Print "Editing Time: " & oDP.EditingTime
Debug.Print "Hyperlink: " & oDP.HyperlinkBase
Debug.Print "Keywords: " & oDP.Keywords
Debug.Print "LastSavdBy: " & oDP.LastSavedBy
Debug.Print "Last Updated: " & oDP.LastUpdated
Debug.Print "Revision number: " & oDP.RevisionNumber
Debug.Print "Subject: " & oDP.Subject
Debug.Print "Titls: " & oDP.title

Do While Len(Trim(oDP.Custom(I)))
If Trim(oDP.Custom(I)) <> "=" Then
Debug.Print "Custom " & I & " is " & oDP.Custom(I)
End If
I = I + 1
Loop

oDP.LetOff

End Sub


"Everybody is ignorant, only on different subjects." — Will Rogers
 
Borgunit,

That bit of code you wrote looks like it will do the trick perfectly but......., I can't get it to work. I understand that the problem is at my end, but I could use a little extra help on this. The Dim statement with the DWGPROPSXLib.Properties causes it to crash so I think I need to add a reference, but I don't know which one? Your help is appreciated.

Thanks
 
In your VBA IDE, from Tools>>References make a reference to the "ObjectDBX 1.0 Type Library" (axdb15.dll). You make need to register the file with Windows if it is not already.

"Everybody is ignorant, only on different subjects." — Will Rogers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor