Spatial Modeler Discussions

Gain, exchange, and share knowledge, or discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of Hexagon Geospatial products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Senior Member
Posts: 1
Registered: ‎04-22-2020

Retrieving eml items and application context created from another dll

I am currently trying to develop a plugin for Stereo Analyst application and am struggling to understand how to obtain instances to the eml parts which are initialised outside my code in order to programatically interact with them (e.g querying checkbox value, programatically adding menu buttons).

 

There are examples of interacting with the User Interface and retrieving eml part values but these are typically standalone applications where the same bit of code initialises the application context, parses the eml and displays the eeml frame using the pointer returned during parsing. I cannot find any examples of interacting with eeml frames which are owned by a third party (in this case the main stereo analyst application) 

 

I have tried two main routes, both of which have failed

 

  • using eeml_ParseVa specifying the relevant eml file (ws_feature.eml), and then using eeml_FindMenu or eeml_PartFind but the resulting items returned do not seem to correspond to the state in the UI and the application context is null (presumably because I did not pass one in when calling eeml_ParseVa. However in this case I don't want to specify an application context when parsing, I want to obtain the existing one which was set by the other dll. 
  • Get a reference to a frame using  eeml_GetTheRoot , eeml_FindComponentInRoot and eeml_FindFrameInComponent but again the context is null and no api functions seem to exist to find parts below the frame level using this route (they all seem to need a parse result)

 

In terms of interacting with the eml I would be grateful if you could clarify :

 

  1. What is the correct way to get a reference to an eml button/frame which was initalised / displayed by another dll in order to interogate its value
  2. What is the correct way to get the application context of a frame / component which was set/initialised in another dll. 
  3. What is the correct way to send a mousedown event to a eml button which was initialised in another dll

 

Appreciate this is several questions but I imagine they all have a fairly common solution so seemed clearer to contain them in a single post.

 

Any help would be greatly appreciated.

 

I am using Stereo Analyst packaged with ERDAS IMAGINE 2020 and the SMSDK 2020. 

 

 

 

 

 

 

 

 

 

Highlighted
Staff
Posts: 26
Registered: ‎04-26-2018

Re: Retrieving eml items and application context created from another dll

There is no correct way to interact with the parts in an EML application from an external DLL. As you have noted all of the scripts parsed by an EML application do get registred in an internal tree and this tree can be accessed from an external DLL. When your DLL parses one of the application scripts it gets a handle to a separate version of the parsed script and not the one used by the application, so interacting with this handle does not affect the application. You have also noted that you can search the internal tree and get a handle, for example, to a frame from the script. Most applications, though, clone the frame pointed to by the handle, using it as a template. This means that using this handle also has no affect on the application.