.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change SummaryInfo

1 REPLY 1
Reply
Message 1 of 2
mkotsamanes
381 Views, 1 Reply

Change SummaryInfo

I'm having some problems migrating an existing VBA code to VB express

I used to be able to save to the summary info as follow

{code}
ThisDrawing.SummaryInfo.Title = TXT_Title.Text
ThisDrawing.SummaryInfo.Subject = TXT_Subject.Text
ThisDrawing.SummaryInfo.Author = TXT_Author.Text
ThisDrawing.SummaryInfo.Keywords = TXT_Keywords.Text
ThisDrawing.SummaryInfo.Comments = TXT_Comments.Text
ThisDrawing.SummaryInfo.RevisionNumber = SPN_Rev.Value
{code}

I have be able to figure out how to get this data into my new code

{code}
Dim doc As Document = Application.DocumentManager.MdiActiveDocument
dwgTitle = doc.Database.SummaryInfo.Title
... etc
{code}

I just cant figure out how to store new variables back out.

Thanks
Mark
1 REPLY 1
Message 2 of 2
mkotsamanes
in reply to: mkotsamanes

I figured out how to get it to work, I still have other issues but I'm working on them.

{code}
Dim dsi As DatabaseSummaryInfo = ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database.SummaryInfo
Dim dsib As New DatabaseSummaryInfoBuilder(dsi)

dsib.Title = txtTitle.Text
dsib.Subject = txtSubject.Text
dsib.Author = txtAuthor.Text
dsib.Keywords = txtKeyword.Text
dsib.Comments = txtComments.Text
dsib.RevisionNumber = nudRevision.Value

dsi = dsib.ToDatabaseSummaryInfo
{code}

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost