Drawing properties

Discussion in 'AutoCAD' started by Rakesh Rao, Oct 22, 2004.

  1. Rakesh Rao

    Rakesh Rao Guest

    How do I access the drawing properties (Title, Subject, Author,
    Custom...) via Automation? Is it possible via VBA? I could not see any
    objects which exposed this feature.

    Any pointers appreciated.

    Thanks & Regards
    Rakesh

    --
    --
    - Rakesh Rao [ rakesh.rao (at)4d-technologies.com ]
    - Four Dimension Technologies
    [www.4d-technologies.com]
    - Get GeoTools, Work smarter: www.4d-technologies.com/geotools
    - Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter
     
    Rakesh Rao, Oct 22, 2004
    #1
  2. Rakesh Rao

    Jürg Menzi Guest

    Hi Rakesh Rao

    Drawing props are stored in a dictionary named 'DWGPROPS':
    Code:
    Public Sub GetDwgProperties()
    
    Dim DwgInf As AcadXRecord
    Dim DatTyp As Variant
    Dim DatVal As Variant
    Dim ArrCnt As Integer
    
    On Error GoTo NotSet
    
    Set DwgInf = ThisDrawing.Dictionaries("DWGPROPS")
    DwgInf.GetXRecordData DatTyp, DatVal
    
    For ArrCnt = LBound(DatTyp) To UBound(DatTyp)
    ThisDrawing.Utility.Prompt vbCrLf & DatTyp(ArrCnt) & vbTab & DatVal(ArrCnt)
    Next ArrCnt
    
    Exit Sub
    
    NotSet:
    MsgBox " Drawing properties are not set. "
    
    End Sub
    
    Cheers
     
    Jürg Menzi, Oct 22, 2004
    #2
  3. Dim oSI As AcadSummaryInfo
    Set oSI = ThisDrawing.SummaryInfo
    oSI.Author = "Jimmy Bergmark"
    oSI.Comments = "Some comments"
    oSI.HyperlinkBase = "http://www.jtbworld.com/"
    oSI.Keywords = "CAD"
    oSI.LastSavedBy = "Jimmy Bergmark"
    oSI.RevisionNumber = 1
    oSI.Subject = "Test of summary info"
    oSI.Title = "This is the title"
    Set oSI = Nothing

    --
    Best Regards, Jimmy Bergmark
    CAD and Database Developer Manager at www.pharmadule-emtunga.com
    Take a look at
    JTB FlexReport (FLEXlm report tool) - www.jtbworld.com/jtbflexreport
    SmartPurger (Purges automatically) - www.jtbworld.com/?/smartpurger.htm
    or download some freeware at www.jtbworld.com
    More on AutoCAD 2005;
    www.jtbworld.com/autocad2005.htm
     
    Jimmy Bergmark, Oct 22, 2004
    #3
  4. Rakesh Rao

    Dann Guest

    I Vlisp you can access them like this:
    (setq
    sumry(vla-get-SummaryInfo(vla-get-DataBase(vla-get-ActiveDocument(vlax-get-object
    "AutoCad.Application")))))
     
    Dann, Oct 22, 2004
    #4
  5. Rakesh Rao

    Jürg Menzi Guest

    Hi Jimmy

    Not available in <= A2k2.

    Cheers
     
    Jürg Menzi, Oct 22, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.