dwgprops vba

#1
are the DWGPROPS information exposed through vba. I have set up custom textfields on my standard pspace template which uses variables in DWGPROPS. From what I can glean, ACAD does it through document.summaryinfo

Re: dwgprops vba

#2
Hi Darthurs,
Please refer to this, it works on CMS IntelliCAD, build 11.1.435:

Code: Select all

 Sub Example_SummaryInfo()
    ' Add standard properties
    ActiveDocument.SummaryInfo.author = "Darthurs"
    ActiveDocument.SummaryInfo.comments = "DWGPROPS example"
    ActiveDocument.SummaryInfo.HyperlinkBase = "http://www.intellicad.org"
    ActiveDocument.SummaryInfo.Keywords = "Building Complex"
    ActiveDocument.SummaryInfo.LastSavedBy = "Ben"
    ActiveDocument.SummaryInfo.RevisionNumber = "Build 11.1.435"
    ActiveDocument.SummaryInfo.subject = "SummaryInfo"
    ActiveDocument.SummaryInfo.title = "CMS IntelliCAD"
    
    Dim author As String
    Dim comments As String
    Dim hyperLink As String
    Dim keyWord As String
    Dim lastSave As String
    Dim revision As String
    Dim subject As String
    Dim title As String
    
    ' get and display standard properties
    author = ActiveDocument.SummaryInfo.author
    comments = ActiveDocument.SummaryInfo.comments
    hyperLink = ActiveDocument.SummaryInfo.HyperlinkBase
    keyWord = ActiveDocument.SummaryInfo.Keywords
    lastSave = ActiveDocument.SummaryInfo.LastSavedBy
    revision = ActiveDocument.SummaryInfo.RevisionNumber
    subject = ActiveDocument.SummaryInfo.subject
    title = ActiveDocument.SummaryInfo.title
    
    MsgBox "The standard drawing properties are " & vbCrLf & _
    "Title = " & title & vbCrLf & _
    "RevisionNumber = " & revision & vbCrLf & _
    "Subject = " & subject & vbCrLf & _
    "Author = " & author & vbCrLf & _
    "Comments = " & comments & vbCrLf & _
    "HyperlinkBase = " & hyperLink & vbCrLf & _
    "Keywords = " & keyWord & vbCrLf & _
    "LastSavedBy = " & lastSave & vbCrLf
    
End Sub
cron