.NET

Reply
*Tomi
Message 1 of 1 (129 Views)

SummaryInfo CustomProperties

129 Views, 0 Replies
11-28-2005 08:50 AM
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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!