Hexagon Geospatial
MENU

GeoMedia

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 18
Registered: ‎11-03-2016
Accepted Solution

Getting information from Located Object

Hi!

I want to create a custom command in Geomedia 14, which can provide me information about the object I clicked on in the MapWindow.
I can get the object itself with the LocatedObjectsCollection, but how can I get some information about this object, like which FeatureClass it is in, or what are its attributes, etc.

Thanks!
Chris

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

Re: Getting information from Located Object

Hello Chris,

 

the LocatedObjectsCollection can hold an object of the following type: RecordObject, GeometryObject, RecordsetObject and RasterObject. See the GeoMedia Object Reference help for details on each of these objects type. Basically, each object has a property named Recordset and Bookmark, which indicates the position of the current record in the Recordset. To get the connection of the given recordset is not easy, since a recordset displayed in a map can be created from several sources based on one or more connections. So this is basically viable to find only in the case when the recordset is based on an OriginatingPipe. You can find that by querying the GRecordset.GetExtension("OriginatingPipe") property in a try...catch block. If it throws an exception, then the recordset is not based on OriginatingPipe. If there is no exception, the property returns the originating pipe which was used to create the recordset. In this case, you have access to the connection, attribute filter and geometry filter for the given recordset.

 

You may also consider replacing the built in Properties dialog - the one shown if you insert, edit or double click a feature in the map. For this, look at Controls Automation > Properties Automation > GMProperties in the GM Object Reference help.

 

Pavel

Highlighted
Occasional Contributor
Posts: 18
Registered: ‎11-03-2016

Re: Getting information from Located Object

Thank you, Pavel!

I will try this method! Thanks again!
Chris

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.