I am trying to write a construction tool that uses an embeddable control so I can control the attributes the users put in when the create the features (points). I found a pretty informative Dev Summit session video "ArcGIS Pro SDK for .NET Advanced Editing with Focus on UI Customization", that has to do with pretty much what I need to do so I know it's possible. There is a point in the session where the demo shows the EmbeddableControl implementing IEditingCreateToolControl, and there is also a region in the code for that. To get that to work, the refID in the config.daml for the embeddablecontrol has to be "esri_editing_tool_options", which I set up, as well as everything else the demo showed to set up. However, this is still not working for me, I'm thinking maybe a step was left out in the demo? Or possibly something I set up was wrong, even though I've been through the demo multiple times, double and triple checked spelling, etc. I've also tried to find samples on github (not much out there for this, the ConstructionTool Buffer Line project was about the only one that I could find.
Thank you in advance for any info that could help me get over this step...
Jeff
This is the declaration in the viewmodel:
namespace ProAddressApplication
{
internal class CreatePoints_UIViewModel : EmbeddableControl, IEditingCreateToolControl (the IEditingCreateToolControl shows underlined in red)
{
public CreatePoints_UIViewModel(XElement options, bool canChangeOptions) : base(options, canChangeOptions) { }
The config.daml text is below:
<ArcGIS defaultAssembly="ProAddressApplication.dll" defaultNamespace="ProAddressApplication" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
<AddInInfo id="{0fdd9676-2c6b-455b-b17d-84afcd1d0981}" version="1.0" desktopVersion="2.7.26828">
<Name>ProAddressApplication</Name>
<Description>ProAddressApplication description</Description>
<Image>Images\AddinDesktop32.png</Image>
<Author>jeffs</Author>
<Company>Acme</Company>
<Date>1/7/2021 8:39:29 AM</Date>
<Subject>Framework</Subject>
<!-- Note subject can be one or more of these topics:
Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration -->
</AddInInfo>
<modules>
<insertModule id="ProAddressApplication_Module" className="Module1" autoLoad="false" caption="Module1">
<!-- uncomment to have the control hosted on a separate tab-->
<tabs>
<!--<tab id="ProAddressApplication_Tab1" caption="New Tab">
<group refID="ProAddressApplication_Group1"/>
</tab>-->
</tabs>
<groups>
<!-- comment this out if you have no controls on the Addin tab to avoid
an empty group-->
<group id="ProAddressApplication_Group1" caption="Group 1" appearsOnAddInTab="true">
<!-- host controls within groups -->
</group>
</groups>
<controls>
<!-- add your controls here -->
<tool id="ProAddressApplication_AddrApp_CreatePoints"
categoryRefID="esri_editing_construction_point"
caption="AddrApp _CreatePoints"
className="AddrApp_CreatePoints"
loadOnClick="true"
smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonRed16.png"
largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonRed32.png">
<!--note: use esri_editing_construction_polyline, esri_editing_construction_polygon for categoryRefID as needed-->
<tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip>
<content guid="93be836c-5a92-4930-8075-c3ecd893a6be" toolOptionsID="ProAddressApplication_CreatePoints_UI" />
</tool>
</controls>
</insertModule>
</modules>
<categories>
<updateCategory refID="esri_editing_tool_options">
<insertComponent id="ProAddressApplication_CreatePoints_UI" className="CreatePoints_UIViewModel">
<content className="CreatePoints_UIView" />
</insertComponent>
</updateCategory>
</categories>
</ArcGIS>