Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 9
Registered: ‎02-20-2018
Accepted Solution

Unable to create UniqueValueLegendEntry object

Hi guys,

 

I tried to create a UniqueValueLegendEntry with

PAdvLgd.UniqueValueLegendEntry uvle = (PAdvLgd.UniqueValueLegendEntry)MyApp.CreateService("GeoMedia.UniqueValueLegendEntry");

but this error appeared

 

Unable to create the object

 

What is the best way to create it?

 

Thx

John

Technical Evangelist
Posts: 521
Registered: ‎09-11-2015

Re: Unable to create UniqueValueLegendEntry object

Hi John,

 

object of type GeoMedia.UniqueValueLegendEntry does not exist. Look at the ThematicClassificationService object for a help on how to create thematic legend entries.

 

Pavel

Occasional Contributor
Posts: 9
Registered: ‎02-20-2018

Re: Unable to create UniqueValueLegendEntry object

Hi Pavel,

 

I just found it in the GeoMedia Object Reference!

So now I have used ThematicClassificationService and made ClassifyLegendEntry method and it made the the classes in the legend entry but it represents 0 number of features bewtween paranthesis 

So I have two question; Firstly, What should I do inorder to relate the number of the records in each class with the number of the features?

Secondly, Do I have to make a ThematicClass object inorder to give a style for each legend subentry?

 

Thanks

John

Technical Evangelist
Posts: 521
Registered: ‎09-11-2015

Re: Unable to create UniqueValueLegendEntry object

Hi John,

 

you have basically three options:

  1. use the method CreateRangeClasses
  2. use the method CreateUniqueValueClasse
  3. or create the ThematicClass objects manually and populate the collection got by GetLegendEntryClasses method

After that, you can call the method ClassifyLegendEntry.

 

Pavel

Occasional Contributor
Posts: 9
Registered: ‎02-20-2018

Re: Unable to create UniqueValueLegendEntry object

[ Edited ]

Hi Pavel,

 

Can I classify based on a what character does a cell value starts; I mean to classify every cell that starts with "1" into a single class and classify those starts with "2" in another single class, and so on?

It's something like using the expression "LEFT".

 

Thx

John

Polls
Please register to vote
Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.