×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Can I get Drawing Properties from Outside the drawing

Can I get Drawing Properties from Outside the drawing

Can I get Drawing Properties from Outside the drawing

(OP)
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

RE: Can I get Drawing Properties from Outside the drawing

I think so
Not 100% sure, you may need ObjectDBX
and Yes

you may want to check out Blockwerx from http://cadwerx.net



http://www.resourcecad.com ~ for your CAD solutions

RE: Can I get Drawing Properties from Outside the drawing

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

RE: Can I get Drawing Properties from Outside the drawing

(OP)
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

RE: Can I get Drawing Properties from Outside the drawing

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources