.NET

Reply
Distinguished Contributor
cadcamm99
Posts: 161
Registered: ‎04-12-2005
Message 1 of 2 (267 Views)
Accepted Solution

Get custom property value

267 Views, 1 Replies
09-18-2013 07:22 AM

I am using AutoCAD 2014 and VB.NET 2010.  I am trying to get the value of a custom property and cannot seem to do so.

 

The old command I used for AutoCAD 2010 was:

ThisDrawing.SummaryInfo.GetCustomByKey(strParameter, strValue)

 

But this does not work anymore. So I created this sub but it does not seem to work either.  Any clues to what I am doing wrong?

 

Public

Sub subFindCustomParam(ByVal strUserParameter AsString)

       

   Dim infoDB AsDatabase =Application.DocumentManager.MdiActiveDocument.Database

   Dim infoBuilder AsDatabaseSummaryInfoBuilder = NewDatabaseSummaryInfoBuilder(infoDB.SummaryInfo)       

   Dim infodict AsDBDictionary = infoBuilder.CustomPropertyTable

 

   ForEach infoentry As DictionaryEntry In infodict

           

      If strUserParameter = infoentry.Key Then

                CurrentParameterValue = infoentry.Value

 

                   bolCustomPropertyFound =True

        Exit For

      EndIf

   Next

EndSub

I figured it out.  Dictionary should be iDictionary.

Distinguished Contributor
cadcamm99
Posts: 161
Registered: ‎04-12-2005
Message 2 of 2 (261 Views)

Re: Get custom property value

09-18-2013 07:47 AM in reply to: cadcamm99

I figured it out.  Dictionary should be iDictionary.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.