Hi Guys,
I am currently trying to find a way of adding mapx into project silently instead of loading the map pane.
Because the tool I create require to be active at current layout, after the mapx is added, it is switched back to map pane.
Any way I can achieve without switching to map pane?
Any idea Uma Harano, Wolfgang Kaiser?
Below is the code I use at the moment. Pro version is 2.5
IProjectItem mapX <SPAN class="operator token">=</SPAN> ItemFactory<SPAN class="punctuation token">.</SPAN>Instance<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Create</SPAN><SPAN class="punctuation token">(</SPAN>"<SPAN class="comment token">///mapx file path") as IProjectItem;</SPAN>
<SPAN class="keyword token">bool</SPAN> isAdd <SPAN class="operator token">=</SPAN> Project<SPAN class="punctuation token">.</SPAN>Current<SPAN class="punctuation token">.</SPAN><SPAN class="token function">AddItem</SPAN><SPAN class="punctuation token">(</SPAN>mapX<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//After Queuetask await is done, the current active layout pane switch to newly added map pane</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>