|
POST
|
I haven't seen code like that. I know that there is possibility to change caption or image of existing button from code. All things with user interface you can access via FrameworkApplication.GetPlugInWrapper. Try to investigate on that direction.
... View more
04-04-2022
12:08 AM
|
0
|
1
|
1489
|
|
POST
|
Hi, You can't directly add button to tab. You can add button to group in tab. You can update every group if you know id of the group. How to insert button into a group owned by different module you can find here: ProGuide Buttons · Esri/arcgis-pro-sdk Wiki · GitHub Change refid to your group id. You can create one add-ins with tab and group but without buttons. In other add-ins you can reuse first add-in infrastructure to place buttons or other controls.
... View more
04-03-2022
10:08 PM
|
0
|
3
|
1495
|
|
POST
|
Hi, "Most ArcGIS applications that can connect to a PostgreSQL database include the required PostgreSQL client libraries. These applications include ArcGIS Server, ArcGIS Pro, ArcGIS Desktop, and ArcReader." PostgreSQL database requirements for ArcGIS 10.7.x and ArcGIS Pro 2.3 and 2.4—System Requirements | Documentation All required software is included in to ArcObjects if you will use SDE connection. ArcObjects SDK is the same for ArcGIS ArcMap or Engine. Difference is that you need to start from license checking in ArcGIS Engine. ArcMap does license checking itself.
... View more
03-31-2022
10:13 PM
|
0
|
0
|
1139
|
|
POST
|
Hi, You need to listen PropertyChanged event on each layer, o layers you want. var layerList = MapView.Active.Map.GetLayersAsFlattenedList().OfType<Layer>();
foreach(var layer in layerList)
{
layer.PropertyChanged += MyLayerPropertyChanged;
} private void MyLayerPropertyChanged(object sender, PropertyChangedEventArgs e)
{
// your code here
}
... View more
03-31-2022
07:59 AM
|
1
|
1
|
964
|
|
POST
|
Hi, You could call the same Table Compare tool from python code. After you run Table Compare geoprocessing tool from ArcGIS Pro click Open history. Right click on Table Compare item and choose "Copy Python Command" and paste it to your code. Change input parameters depending on your code. More info here: https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/table-compare.htm List of tables you could get using arcpy.ListTables()
... View more
03-30-2022
01:08 AM
|
0
|
0
|
1237
|
|
POST
|
Less code is right way. It is better to use arcpy functionality to check database existing or where available. Make python modules to store reusable code.
... View more
03-29-2022
07:04 AM
|
0
|
0
|
4279
|
|
POST
|
Hi, You could store the length of the line and its name in the list of Tuple's var tupleList = new List<Tuple<int, string>>();
tupleList.Add(Tuple.Create( 1, "cow" ));
tupleList.Add(Tuple.Create( 5, "chickens" ));
tupleList.Add(Tuple.Create( 1, "airplane" )); If your names are unique you could store your information in Dictionary<string, int>
... View more
03-29-2022
06:50 AM
|
1
|
1
|
1783
|
|
POST
|
Try this below. I have changed WorkingFolder for testing. import arcpy
import os
def CreateBaseData(location, names):
subfolder_name = None
database_name = None
subfolder = None
database = None
for name in names:
if '.gdb' in name:
database_name = name
else:
subfolder_name = name
subfolder = os.path.join(location, subfolder_name)
database = os.path.join(subfolder, database_name)
if (os.path.isdir(subfolder) == False):
os.mkdir(subfolder)
arcpy.CreateFileGDB_management(subfolder, database_name)
else:
if (arcpy.Exists(database) == False):
arcpy.CreateFileGDB_management(subfolder, database_name)
return database
# Create folder and file geodatabase
WorkingFolder = os.path.dirname(__file__)
subfolderName = 'Updates'
databaseName = 'Updates.gdb'
names = [subfolderName, databaseName]
database = CreateBaseData(WorkingFolder, names)
print(database)
... View more
03-29-2022
06:06 AM
|
0
|
2
|
4284
|
|
POST
|
Hi, I think you need to delete line #28 and align next if to the first one
... View more
03-28-2022
08:48 AM
|
0
|
1
|
4311
|
|
POST
|
Hi, Take a look how Esri does. Open Select by Attributes tool. And you could find something similar: It is not efficient to put so much items to combobox. One of ways is to find WPF autocomplete control source and place inside customcontrol and fill combobox after typing.
... View more
03-28-2022
08:40 AM
|
0
|
0
|
974
|
|
POST
|
There is possibility to do that from the code behind. I have tried to test on WebViewBrowser from ArcGIS community samples but it doesn't work on my computer at all without changes. Add name and one of events (Initialized or CoreWebView2InitializationCompleted) to frameworkControls:WebViewBrowser: <frameworkControls:WebViewBrowser x:Name="webView" Grid.Row="1" Grid.ColumnSpan="3" Source="{Binding SourceUri, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Initialized="WebViewBrowser_Initialized" CoreWebView2InitializationCompleted="WebView_CoreWebView2InitializationCompleted"/> Then create events methods in code behind and add logic from link: private void WebViewBrowser_Initialized(object sender, EventArgs e)
{
if(webView.CoreWebView2 != null)
{
Debug.WriteLine("not null");
// Implement logic from link
}
}
private void WebView_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
{
if(webView.CoreWebView2 != null)
{
Debug.WriteLine("not null");
// Implement logic from link
}
} I don't know which event is right because can't test.
... View more
03-25-2022
08:03 AM
|
0
|
0
|
8050
|
|
POST
|
Hi, There are sharing snippets for ArcGIS Pro SDK: https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-sharing. I think "Portal: Execute a portal search" could be useful for your task,
... View more
03-24-2022
11:51 PM
|
1
|
1
|
1528
|
|
POST
|
Hi, Have you tried this: https://docs.microsoft.com/en-us/answers/questions/144386/how-to-set-cookies-to-webview2-control-in-c.html It uses CoreWebView2Ready event
... View more
03-24-2022
11:40 PM
|
0
|
6
|
8068
|
|
POST
|
Hi, You can check Licensing sample . RegistrationWindow is dialog which could be a base for your needs. To open it from add-in button add code below: var regWindow = new RegistrationWindow();
regWindow.ShowDialog();
... View more
03-24-2022
05:14 AM
|
1
|
0
|
1261
|
|
POST
|
From Table of FeatureClass definition you can get Fields: var fields = d.GetFields();
foreach (var x in fields)
{
string fieldName = x.Name;
} Place after line 12 in code above
... View more
03-23-2022
08:23 AM
|
0
|
0
|
2957
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Tuesday | |
| 1 | a week ago | |
| 2 | 04-24-2026 08:33 AM | |
| 1 | 03-23-2026 11:44 AM | |
| 1 | 05-22-2024 11:48 PM |
| Online Status |
Online
|
| Date Last Visited |
Tuesday
|