|
POST
|
Hi Horia, It looks like the designer of the Pro Framework's message box didn't take large amounts of text into account. We will have the dev team take a look at that. However, I have a solution in regards to your item 3) 3. Content cannot be highlighted and/or copied to the clipboard If your messagebox window has system focus, you can use the Ctrl+C (copy command) to copy the content of the message box to the clipboard. It appears that all text on the messagebox (even if it's clipped by the display) is copied to the clipboard. This is the same feature that exists in the Window's system message box control.
... View more
10-12-2016
02:23 PM
|
1
|
1
|
1771
|
|
POST
|
Hi JB, The ArcGIS.Core.Data API is a DML-only (Data Manipulation Language) API. Schema creation and modification are preformed using the Geoprocessing API. You can find a sample on how to call a Geoprocessing task from the API here: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Geodatabase/AddDeleteFieldToFromFeatureClass To create a File Geodatabase you can use this (button add-in) code snippet: protected override async void OnClick()
{
var bCreated = await ExecuteAddFileGDB(@"c:\temp\test", @"MyNewFileGDB");
if (bCreated) MessageBox.Show("File GDB Created");
}
private async Task<bool> ExecuteAddFileGDB(string fileGdbPath, string fileGdbName)
{
try
{
return await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
var fGdbPath = fileGdbPath;
var fGdbName = fileGdbName;
var fGdbVersion = "Current"; // create the 'latest' version of file Geodatabase
System.Diagnostics.Debug.WriteLine($@"create {fGdbPath} {fGdbName}");
var parameters = Geoprocessing.MakeValueArray
(fGdbPath, fGdbName, fGdbVersion);
var cts = new CancellationTokenSource();
var results = Geoprocessing.ExecuteToolAsync("management.CreateFileGDB", parameters, null, cts.Token,
(eventName, o) =>
{
System.Diagnostics.Debug.WriteLine($@"GP event: {eventName}");
});
return true;
});
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
return false;
}
}
... View more
10-10-2016
10:01 AM
|
1
|
0
|
1816
|
|
POST
|
Windows 8, 64 bit, ArcMap 10.4.1 and Visual Studio 2013 Pro is a supported configuration for the installation of the .Net SDK of ArcObjects 10.4. Please double check your configuration and if that doesn't resolve your issue please contact Esri support.
... View more
10-02-2016
10:15 PM
|
0
|
0
|
1093
|
|
POST
|
The main intend for the desktopVersion attribute is ensure add-in compatibility with Pro. The version ensures that you are not using an add-in with an old version of Pro (let's say 1.2), when the add-in was built using a newer version of Pro (let's say 1.3 or 1.4 beta). The old 1.2 version of Pro cannot run the 1.3 add-in because the 1.3 API changed (was added on to) and has additional functionality.
... View more
09-22-2016
10:56 AM
|
0
|
0
|
1497
|
|
POST
|
Hi Ted, To change the target version you have to change the desktopVersion attribute of the AddInInfo tag in your config.daml file. You can replace your current desktopVersion value with "1.3".
... View more
09-22-2016
09:47 AM
|
0
|
2
|
1497
|
|
POST
|
Hi Ted, I updated the sample @ https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ProgressDialog and added a progress dialog that iterates through a given number of steps as shown in my post above (see the readme.md for a screenshot of this functionality).
... View more
07-15-2016
11:53 AM
|
1
|
0
|
722
|
|
POST
|
Hi Ted, I you use the sample @ https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ProgressDialog and make the update below in the "RunDialogButtonsCancel" class you will get the desired effect. I will update the sample soon to reflect this capability. The trick is to create your own ProgressDialog instance and specify the 'maximum steps' parameter. protected override async void OnClick() { //If you run this in the DEBUGGER you will NOT see the dialog uint maxSteps = 5; var pd = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog( "Doing my thing - cancelable", "Canceled", maxSteps, false); await ProgressDialogModule.RunCancelableProgress( new CancelableProgressorSource(pd), maxSteps); }
... View more
07-15-2016
11:01 AM
|
1
|
0
|
722
|
|
POST
|
Hi Horia, I verified your observations and will relay your findings to the developers. I made a few changes to the custom popup sample https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/CustomPopup specifically in "CustomPopupTool.cs" and this what I observed: Line 64 instantiates DynamicPopupContent which allows me to customize each page (by overriding "OnCreateHtmlContent"): kvp.Value.ForEach(id => popups.Add(new DynamicPopupContent(kvp.Key, id))); If I run the code as shown above I do observe that the Title customization is not properly applied, however if I change the code to use the "configured pop-ups" content (from the Pop-ups dock pane) then I get the proper behavior regarding the title. This is simply done by changing line 64 as follows: kvp.Value.ForEach(id => popups.Add(new PopupContent(kvp.Key, id))); No as i scroll through my pop-up records i can see that the title changes according to what i specified on the Pop-ups dock pane for that layer. Finally i can also override the Title property in the overridden "OnCreateHtmlContent" method in order to correct the title as required, but this causes a flash on the title bar as the old title is overridden.
... View more
07-13-2016
03:58 PM
|
2
|
0
|
2129
|
|
POST
|
The current map view requires a 'current' active tool. You can look at this snippet how to change the current tool: FrameworkApplication.SetCurrentToolAsync("esri_mapping_selectByRectangleTool"); where "esri_mapping_selectByRectangleTool" is the DAML id of the tool. See: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Framework#set-the-current-tool
... View more
07-12-2016
11:53 AM
|
0
|
3
|
4973
|
|
POST
|
I modified the sample to use the 'selected' layer for the add/delete operations and it appears the same problem you discovered in the Pro UI exists even when I programmatically change the schema - the schema change is always executed on the top most layer (given your pre-conditions). Everything works as expected after I make the layer name unique. Maybe for the time being you can append a string to your layer names (like ... "RoadSegment (production)" and "RoadSegment (proposed)" ) in order to work around this issue until a fix is available.
... View more
07-11-2016
11:46 AM
|
0
|
1
|
2129
|
|
POST
|
Hi Horia, My sample always looks at the top most layer to perform its actions (add/delete field) and that seems to work. When I tried your scenario from the user interface by deleting a field of the layer that is not the top most layer (with your given setup) I also noticed that the field in the top most layer was deleted instead of the field in the layer that I had chosen. We relayed the scenario to the appropriate developers and I will try a small modification to my sample to check if the behavior fails programmatically as well. Thanks Wolfgang
... View more
07-11-2016
10:30 AM
|
0
|
0
|
2129
|
|
POST
|
I added a new sample to community sample repo: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Geodatabase/AddDeleteFieldToFromFeatureClass I also tested this sample with a scenario similar to yours by adding two feature classes that are stored in to different geodatabases to my map using the same layer name. The sample changes the top most layer, I added the new field and it worked as expected: Next I moved my second top layer to the top and added a new field here as well: Finally I deleted the latest newly added field which worked as expected: Maybe you can try the sample and see if it works with your data.
... View more
07-08-2016
08:16 PM
|
0
|
4
|
2129
|
|
POST
|
For future reference you can find this type of information on our GitHub ArcGIS-pro-sdk repository under the requirement section (https://github.com/Esri/arcgis-pro-sdk/wiki#requirements) and in the release notes section: https://github.com/Esri/arcgis-pro-sdk/wiki#release-notes
... View more
07-07-2016
02:55 PM
|
0
|
1
|
1130
|
|
POST
|
I tried the following code (new project and simply adding an AddField button) using the sample data from the community samples (GitHub) repo and it worked without any exceptions. To catch any exceptions in your code you should always use a try {} catch () {} sequence like in my sample below.
internal class AddField : Button
{
protected override async void OnClick()
{
await ExecuteAddFieldTool("test2", "Test 2", "TEXT", 100);
}
private async Task<bool> ExecuteAddFieldTool(string fieldName, string fieldAlias, string fieldType, int? fieldLength = null,
bool isNullable = true)
{
try
{
var inTable = @"TestLines";
var workspaceName = @"C:\Data\FeatureTest\FeatureTest.gdb";
var parameters = Geoprocessing.MakeValueArray(inTable, fieldName, fieldType.ToUpper(), null, null,
fieldLength, fieldAlias, isNullable ? "NULABLE" : "NON_NULLABLE");
var env = Geoprocessing.MakeEnvironmentArray(workspace: workspaceName);
var cts = new System.Threading.CancellationTokenSource();
var results = Geoprocessing.ExecuteToolAsync ("management.AddField",
parameters, env, cts.Token, (eventName, o) =>
{
switch (eventName)
{
case "OnValidate":
if (((IGPMessage[]) o).Any(it => it.Type == GPMessageType.Warning))
{
MessageBox.Show($"{eventName}: {o}");
}
break;
case "OnMessage":
case "OnProgressMessage":
MessageBox.Show($"{eventName}: {o}");
break;
case "OnProgressPos":
MessageBox.Show($"{eventName}: {o} %");
break;
default:
MessageBox.Show($"{eventName}: {o} %");
break;
}
});
await results;
return true;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
return false;
}
}
... View more
06-17-2016
09:20 AM
|
0
|
2
|
919
|
|
POST
|
After you change the Selection color try to use 'SetDefinition' on your FeatureLayer as in (from API reference guide): public void SetDefinition( CIMBaseLayer baseLayer ) GetDefinition only returns a copy of ArcGIS Pro's internal settings (not a reference), SetDefinition will then post your changes back to ArcGIS Pro. Also you can find some samples dealing with the CIM here: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/CIMExamples
... View more
06-08-2016
04:09 PM
|
0
|
0
|
2200
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-30-2025 12:03 PM | |
| 1 | 10-06-2025 01:19 PM | |
| 1 | 10-06-2025 10:37 AM | |
| 1 | 09-24-2025 09:12 AM | |
| 1 | 07-15-2022 07:30 AM |
| Online Status |
Offline
|
| Date Last Visited |
a month ago
|