Get and Set File Summary Information Example (VBA)
This example shows how to get and set the file
summary information in a SolidWorks
document.
'---------------------------------------------
' Set and get the Title KeyWord in the File Summary Info
ModelDoc2.SummaryInfo(swSumInfoTitle)
= "Title"
Text = ModelDoc2.SummaryInfo(swSumInfoTitle)
' Set and get the Subject KeyWord in the File Summary
Info
ModelDoc2.SummaryInfo(swSumInfoSubject)
= "Subject"
Text = ModelDoc2.SummaryInfo(swSumInfoTitle)
' Set and get the Author KeyWord in the File Summary Info
ModelDoc2.SummaryInfo(swSumInfoAuthor)
= "Author"
Text = ModelDoc2.SummaryInfo(swSumInfoAuthor)
' Set and get the Keywords KeyWord in the File Summary
Info
ModelDoc2.SummaryInfo(swSumInfoKeywords)
= "Keywords"
Text = ModelDoc2.SummaryInfo(swSumInfoKeywords)
' Set and get the Comment KeyWord in the File Summary
Info
ModelDoc2.SummaryInfo(swSumInfoComment)
= "Comment"
Text = ModelDoc2.SummaryInfo(swSumInfoComment)
' Get the read only Summary info fields
Text = ModelDoc2.SummaryInfo(swSumInfoSavedBy)
Text = ModelDoc2.SummaryInfo(swSumInfoCreateDate)
Text = ModelDoc2.SummaryInfo(swSumInfoSaveDate)