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

SummaryInfo CustomProperties

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
267 Views, 0 Replies

SummaryInfo CustomProperties

Hi,
I'm trying to read FileSummaryInfo.Customproperties but I get an error
while trying to read the entries. Any ideas what I'm missing/doing wrong in
here?

/ Tomi


Public Shared Function GetCustomProperty(ByVal doc As Document, ByVal
szCustomProp As String) As String
Dim oAcadSummaryInfo As DatabaseSummaryInfo
Dim oAcadDB As Database = doc.Database
oAcadSummaryInfo = oAcadDB.SummaryInfo
Try
Dim oCustomProps As System.Collections.IDictionaryEnumerator =
oAcadSummaryInfo.CustomProperties
oCustomProps.Reset()
oCustomProps.MoveNext()
Do While oCustomProps.MoveNext = True
If oCustomProps.Key = szCustomProp Then
Return oCustomProps.Value.ToString
End If
oCustomProps.MoveNext()
Loop
Catch
Return Nothing
End Try
End Function
0 REPLIES 0

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