Developers Knowledge Base

GeoMedia, a comprehensive and dynamic GIS, extracts compelling intelligence from geospatial data and integrates it to present actionable information.
Showing results for 
Search instead for 
Do you mean 

How can the Place Feature command be customized via automation?

by Technical Evangelist on ‎02-15-2016 08:55 AM - edited on ‎04-07-2016 05:37 AM by Moderator (1,124 Views)


A user wants to place different features, but instead of using the regular Place Feature command, the user wants to have a custom button per feature class and not choose from inside a combo box.



The user must add the appropriate settings to the preference set, then call the place feature function using the PostMessage win32 api. See sample code below:


Public Const WM_COMMAND = &H111
Public Const GM_PLACEMENT = &H9C5C


    gobjGeoApp.PreferenceSet.Add "InsertFeatureConnectionName", g_sConnName, 1
    If Err <> 0 Then
        gobjGeoApp.PreferenceSet.SetValue "InsertFeatureConnectionName", g_sConnName, 1
    End If
    gobjGeoApp.PreferenceSet.Add "InsertFeatureFeatureClassName", sTableName, 1
    If Err <> 0 Then
        gobjGeoApp.PreferenceSet.SetValue "InsertFeatureFeatureClassName", sTableOwner & "." & ANCHOR_POINT_TABLE, 1
    End If
    ' Start placement command
    PostMessage gobjGeoApp.AppMainhWnd, WM_COMMAND, GM_PLACEMENT, 0
on ‎04-10-2017 06:26 AM

What would I have to do to edit a specific feature using the built in edit command following this way?

Is there a list of the command message hexcodes?