Locate or select element by primary key

Does anyone know of a way to locate or select a specific feature element by its primary key in Map?

 In our environment we refer to a specific feature element by the primary key when communicating an issue with one another as it frequently is the only unique attribute besides location.  The search in Map Manager does not include the primary key as it is not treated as normal property.  Using the Microstation Search Dialog (key in ITEMS SEARCH) , we can search by the primary key field and the Search Results window successfully displays the correct element, but there is not any obvious select or locate (zoom to) functionality.

Thanks.

  • Perhaps a workaround that suits you is to use the data browser, you can load part or all of the feature information to the dbrowser dialog, it can display the columns as seen in the database. Selecting specific row and right clicking the mouse gives you the locate option in a specific view.

    Thanks,

    Regards

    Carlos



  • Hi. I guess by primary key you mean the internal UUID of the XFM feature instance ? If so, that is normally an internal / programming concept only. I wonder how you actually obtain that value to begin with.

    I think you could achieve what you want using the XFM api, wither in MDL code or in VBA.

       Martin

      

  • Martin and Carlos,

    Thanks for your replies, but, perhaps, I should have been more specific.  The feature is an Oracle Spatial feature that is registered in the GSA.  By primary key, I mean the prmary key column in the Oracle DB table that is used to uniquely identify the row.  When registering the feature Map looks up the primary key column in Oracle and, since it manages that column internally (using an Oracle sequence to create new primary key values), doesn't list it as a property of the feature - which is expected and sensible behaviour since it isn't technically an attribute of the feature.  The problem arises because the primary key does happen to be a VERY convenient way to identify a particular feature element when discussing with other people.  As I mentioned before, it is sometimes the only unique column in the data except for the location.  The location is not a convenient way to communicate a specific element to another person.

    The workaround Carlos proposes does not work since the Data Browser only displays properties of the element and the primary key is not a property and therefore is not available in the Data Browser view.  Interestingly, the Analyze tool will show the primary key field even though it isn't a property, but that doesn't help in locating an element if all the user has is the primary key value.

    Although I'm not talking about the internal UUID, I sure we could write some code to create a Search tool that allows the user to search by the primary key field, but it seems the functionality should be available in Map already as it is something that would be needed quite often and MS/Map has search functionality for just about every other way you could think of to search for a specific element.

    Thanks,

    Les

  • Though the primary key is not exposed to the user in the normal interfaces, have you tried looking at the element information form ? I believe it is shown there.

    Jerry

     

  • Jerry,

    Viewing the primary key value is not the issue, I can see it in several different views (though Element Information is not one of them -  displays an Element ID, but that is not the same value as the primary key column).  

    The problem is being able to search for and locate/select an element by the primary key value.

    Thanks,

    Les