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

Get custom property value

1 REPLY 1
SOLVED
Reply
Message 1 of 2
cadcamm99
764 Views, 1 Reply

Get custom property value

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

1 REPLY 1
Message 2 of 2
cadcamm99
in reply to: cadcamm99

I figured it out.  Dictionary should be iDictionary.

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