|
POST
|
I wonder if anyone has looked into this. Since I need to prevent any deletes of multiple features at all times, I need to be able to detect which construction tool is currently being used. I need to be able to use the Merge tool. Since the Merge tool requires you to select two or more features, my delete logic fails as it thinks you are deleting more than one feature. I could prevent this logic from being hit, or bypass it, by knowing that the tool being used is the esri_editing_MergeFeatures tool. But when i ask for the active tool, it always comes up with selection or whatever tool was previously selected before the Contruction tool was chosed.ArcGIS Pro SDK
... View more
01-03-2019
09:18 AM
|
0
|
2
|
1811
|
|
POST
|
Will I need to do something different in 2.3 on how the Registry ConfigurationFolder works? Will everything be same with that or do I need to set something else on a users machine on initial install so that it always points to the latest well know network folder everytime the config is launched from the shortcut.
... View more
12-19-2018
01:18 PM
|
0
|
0
|
1676
|
|
POST
|
Still stuck on why this happens sometime and not others. So it appears that when a NEW/UPDATED version of the .proConfigX becomes available in the ConfigurationFolder, it unpacks that folder to the assembly cache. But it appears that sometimes it either doesn't unpack it fully or ontime or maybe it is locked out from making the update? The only way to then rectifiy the situation is to blow away the assembly cache item and restart the configuration. Not a big deal to do, but when dealing with many users it is a problem. What I mean by this (fully or ontime or maybe it is locked), is that when I have seen this on a users machine, the only thing in their assembly cache are the .dlls associated with the configuration; the .config file, the .xml files, and the Content Folders are not present. They have not been unpacked. My application has 2 Content folders, and when these are missing, the program will crash as it cannot locate some of the settings located in the content folders or the .config file. This only happens when a new version of the .proConfigX is available. It doesn't happen all the time, but it does happen. All of my users are working on computers well within the specs set forth by the ArcGIS Pro Minimum Requirements. Any ideas? IDEAL Assembly Cache Crashing Assembly Cache after Config Update (Missing Everything)
... View more
12-17-2018
06:59 AM
|
0
|
1
|
1676
|
|
POST
|
This seems to have something to do with the Executing Assembly and using Assembly.GetExecutingAssembly(). Is there a way around this? It seems like maybe the new version is unpacking to the assembly and the reference to GetExecutingAssembly is returning null somehow?
... View more
12-13-2018
10:57 AM
|
0
|
0
|
1676
|
|
POST
|
I have built an ArcGIS pro sdk configuration in order to slim down our application. Everything has been working great. We created an install script that alters a users registry to always look to our network drive for the latest .proConfiX file. So all users now have this in their registry with the path being our deploy location reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro\Settings" /v "ConfigurationFolder" /t REG_SZ /d "X:\PathTo\Configuration\Network\Location" /f This has worked so that a user seamlessly and without any effort gets the latest configuration that we release. They have a shortcut on their Desktop that references which configuration we want them to load. This /config uses our network location from above ArcGISPro.exe" /config:OURCONFIGURATION.proConfigX When a new configX file is discovered (We did a new release), I am guessing that the process is to copy that configX file down to the local users computer and unpack it to %LOCALAPPDATA%\ESRI\ArcGISPro\AssemblyCache\{XXXXX}. All of this seems to work great. Except lately some of our users are getting random startup crashes when they first try and open our application for the first time after the .proConfiX file has been updated. It seems the only way that I can get the application to open is to manually delete the unpacked file %LOCALAPPDATA%\ESRI\ArcGISPro\AssemblyCache\{XXXXX} I think somehow when it looks to the configuration directory it is not clearing it out correctly or somehow it is becoming corrupt? Has anyone seen any issues with this, and am I missing something in my configuration to ensure it clears out the assembly cache on the discovery of a new .proConfigX.
... View more
12-13-2018
06:46 AM
|
0
|
6
|
1792
|
|
POST
|
In my module code, I attempt to stop users from deleting more than one feature at a time using this logic, which has always worked protected async static void OnRowDeleteEvent(RowChangedEventArgs args)
{
try
{
// get the currently selected features in the map
int selectedCount = await FeatureServiceManagement.GetMapSelectionCount();
int selectedFeatureCount = await FeatureServiceManagement.GetMapFeatureSelectionCount();
if (selectedCount > 1 || selectedFeatureCount > 1)
{
//CANCEL the Delete
args.CancelEdit(() => DeleteMultipleError());
return;
}
.
.
.
However, I need to allow a user to use the MERGE functionality/tool from the modify features toolset. the merge tool requires one or more of the selected features to be deleted, the problem is that my code above prevents that deletion (as 2 features are selected). I want to determine if the merge tool has been clicked and by pass my logic if that tool has been initiated. However whenever I call FrameworkApplication.ActiveTool it just returns the Select tool that I previously had selected, not the tool I clicked in the Modify Features window. How do I get the name of the Modify features tool selected from my Module code.
... View more
11-28-2018
01:52 PM
|
0
|
7
|
1948
|
|
POST
|
That was very helpful. I am able to get the Versions of both the Installed ArcGIS Pro and the Installed .proConfigX version with the following. You get the ArcGIS Pro version from the GetEntryAssembly() and the addin/proconfigX version from the GetExecutingAssembly() //ArcGIS Pro Version (GetEntryAssembly) public static string GetArcGISVersionInstalled
{
get
{
string returnVersion = "";
Assembly asm = Assembly.GetEntryAssembly();
if (asm != null)
{
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(asm.Location);
if (fvi != null)
{
returnVersion = String.Format("{0}.{1}.{2}", fvi.ProductMajorPart, fvi.ProductMinorPart, fvi.ProductBuildPart);
}
}
return returnVersion;
}
} //addin/proconfigX Version (GetExecutingAssembly) public static string GetAddinVersion
{
get
{
string returnVersion = "";
Assembly asm = Assembly.GetExecutingAssembly();
if (asm != null)
{
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(asm.Location);
if (fvi != null)
{
returnVersion = String.Format("{0}.{1}.{2}.{3}", fvi.ProductMajorPart, fvi.ProductMinorPart, fvi.ProductBuildPart, fvi.ProductPrivatePart);
}
}
return returnVersion;
}
}
... View more
11-08-2018
06:54 AM
|
0
|
0
|
974
|
|
POST
|
How do I get the version of ArcGIS Pro that is installed. We need to manage which version is installed on our users machines. Our configuration needs to be tested on all versions of pro that is released. So we need to get the exact version that a user has installed on their computer and alert them as to a change they might need to do. //This returns "2.2.0.0"???
string ArcGISProVersionLookup = System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString(); This code only seems to return 2.2.0.0, but I want 2.2.3 like below on the About page
... View more
11-07-2018
07:12 AM
|
0
|
2
|
1048
|
|
POST
|
I want to programatically remove some tools from my configuration that I don't want a user to be able to use and also to set a default tool other than polygon. So below for my Active template, I ant to remove all tools but polygon and RAD Tool, then make the RAD Tool the default. I feel like I need to update the ToolOptions of the CIMEditingTemplate, but it is always null? Am I even on the correct place to accomplish this? private static async void UpdateEditTemplates(FeatureLayer inFeatLayer)
{
try
{
await QueuedTask.Run(() =>
{
//Get CIM layer definition
if (inFeatLayer.GetDefinition() is CIMFeatureLayer layerDef && !layerDef.FeatureTemplates.IsNullOrEmpty())
{
//Get all templates on this layer
List<CIMEditingTemplate> layerTemplates = layerDef.FeatureTemplates.ToList();
//Remove templates matching a pattern
foreach (CIMEditingTemplate CIMTemp in layerTemplates)
{
//TOOL OPTIONS IS NULL?
}
//Set the templates and layer definition back on the layer
layerDef.FeatureTemplates = layerTemplates.ToArray();
inFeatLayer.SetDefinition(layerDef);
}
});
}
catch (Exception e)
{
return;
}
}
... View more
11-06-2018
08:08 AM
|
0
|
1
|
706
|
|
POST
|
I was able to make this work in the new version now. I think this is much cleaner now. This allows you to get user input and act on it should the user select yes or no. And it eliminates the progress dialog that was bothering me. This below just checks for user trying to delete multiple items, but you could also put logic to do something after the user says they want to delete (I sometimes have to delete other objects if a parent polygon is deleted). This would all happen in the task. But here is my simple stop on multiple feature delete attempt. protected async static void OnRowDeleteEvent(RowChangedEventArgs args)
{
try
{
// get the currently selected features in the map
int selectedCount = await FeatureServiceManagement.GetMapSelectionCount();
int selectedFeatureCount = await
FeatureServiceManagement.GetMapFeatureSelectionCount();
if (selectedCount > 1 || selectedFeatureCount > 1)
{
//CANCEL the Delete
args.CancelEdit(() => DeleteMultipleError());
return;
}
// other logic
//
//
//
}
public static Task<bool> DeleteMultipleError()
{
return QueuedTask.Run(() =>
{
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("You cannot delete multiple items at the same time", "Multiple Items Selected", MessageBoxButton.OK, MessageBoxImage.Stop);
return Task.FromResult(false);
});
}
... View more
10-22-2018
06:21 AM
|
0
|
0
|
804
|
|
POST
|
When i delete a feature, I always ask our users if they are sure before I progress to delete or rollback in the OnRowDeleteEvent of my module. //OnRowDeleteEvent
//PROCEED with the delete
args.CancelEdit(() => Task.FromResult(true));
//CANCEL the Delete
args.CancelEdit(() => Task.FromResult(false)); But now it seems that the progressor comes up after my message box has already been shown. My code is waiting for the result of the message box, so this "Deleting Selected Features" must be popping up on some type of out of the box code. Is there a way to suppress this Progressor or maybe I need to take another approach now? Before Now //My code waits for user response, but out of box progressor covers this up now
MessageBoxResult mbr = ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Are you sure you want to Delete this Feature?", "Confirm Delete",
MessageBoxButton.YesNo, MessageBoxImage.Warning);
if (mbr.Equals(MessageBoxResult.Yes))
{
... View more
10-17-2018
02:32 PM
|
0
|
1
|
873
|
|
POST
|
I have a dockpane/tool that when open, I want to prevent users from activating any of my other tools on my tab/group. I created a custom proConfig and want to prevent users from using any tools from say 5 of the 7 groups on my tab. On launch of a tool/dockpane, I want to disable the buttons/groups of others, and reactivate when the tool is closed. I am done with the tool, I just need to know how to disable other groups/buttons in the .daml programmatically. Here is the group definition for my module. When a tool from the Map_AllTools group is activated, I want the other groups to be disabled, until the Tool used is decativated/done. <tabs>
<tab id="Map_Tab1" caption="Map - TEST" keytip="Z1" condition="esri_mapping_mapPane">
<group refID="Map_BasicClipboard" />
<group refID="Map_BasicNavigate" />
<group refID="Map_BasicLayers" />
<group refID="Map_BasicSelection" />
<group refID="Map_BasicInquiry" />
<group refID="Map_BasicFeatures" />
<group refID="Map_AllTools" />
<group refID="Map_GoToTools" />
</tab>
</tabs>
... View more
10-11-2018
06:41 AM
|
0
|
1
|
1281
|
|
POST
|
I am implementing the solution you discussed above. - Creating a Export Polygon Feature Class - Creating a layer file from that class that I color and label as I want - Exporting Layer file and adding it to the content of my .proConfigX file - When Exporting map, I add this feature layer file to a copy of my Active.Map - Remove any existing Rows from that FeatureLayer (so the old ones don't show up if any) - Add the new rows for the Shapes I want to see as overlays to my map - Export the map and clean up. This seems like it might work, as it lets me color the layer file and set its properties on the layer file itself and I don't have to do it in code. Then I just add the layer file to the map using the URI of the .proConfigX. I haven't addressed the speed of efficiency of this process, or if by exporting the layer file when creating the template, if the Dataset will be a problem, because it will no longer be the original dataset.
... View more
10-01-2018
02:06 PM
|
0
|
1
|
3397
|
|
POST
|
Can you create a feature class on the fly like this? Or do I make a make a feature class and save it with the project, then reference it? Or do I make a feature service for just this need and reference it. I don't need the class for anything other than exporting, but I will need to label and color the values that I do add.
... View more
10-01-2018
11:11 AM
|
0
|
0
|
3397
|
|
POST
|
How do i access the mapnote feature class programatically? FeatureLayer LoadLayer = LayerFactory.Instance.CreateFeatureLayer(MapNoteURI, MapView.Active.Map, position);
... View more
10-01-2018
10:49 AM
|
0
|
0
|
3397
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-23-2018 06:49 AM | |
| 1 | 08-02-2023 08:28 AM | |
| 1 | 01-03-2020 10:54 AM | |
| 1 | 11-30-2017 06:41 AM | |
| 1 | 08-20-2018 01:10 PM |
| Online Status |
Offline
|
| Date Last Visited |
01-27-2026
08:03 AM
|