Page 1 of 1

dwgprops vba

Posted: Sun Jul 16, 2023 11:57 am
by darthurs
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

Posted: Sun Jul 16, 2023 6:39 pm
by QuanNguyen
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.intelliCADms.com"
    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

Re: dwgprops vba

Posted: Fri May 31, 2024 12:47 am
by tragicmetal
darthurs wrote:
Sun Jul 16, 2023 11:57 am
are the DWGPROPS information exposed through vbageometry dash lite. 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
I am looking for information about DWGPROPS. Thanks for sharing.