POST
|
When i run the following script in the python window in ArcGIS Pro, ArcGIS Pro crashes. import arcpy, arcgis, numpy, os arcpy.env.overwriteOutput=True proxyHost = "http://some.proxy.some-company.de" proxyPort = "80" #Portal connection cloudUrl = "https://www.some-company.de/arcgis" cloudUser = "contentcreator" cloudPwd = "somepassword" cloudPortal = arcgis.GIS(url=cloudUrl, username=cloudUser, password=cloudPwd, proxy_host=proxyHost, proxy_port=proxyPort) ArcGIS Pro crashes on the last line of my code. The portal i like to call is a local installed ArcGIS Enterprise instance with Portal for ArcGIS (version 10.9) behind a webadaptor. ArcGIS Pro is version 2.9.2. Windows eventdata on the crash: ArcGISPro.exe 2.9.2.32739 61fd3020 python37.dll 3.7.11150.1013 60fb68a6 c00000fd 000000000020af66 1504 01d8384b07d79d1d C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python37.dll d4281c47-ed6a-46bc-8db8-6569a208d0de Aim of my script is an automated upload of created mmpk files to the portal like here: https://github.com/WestonSF/ArcGISEnterpriseToolkit/blob/master/CreateMobileMapPackage.py Has anyone some suggestions why ArcGIS Pro crashes and how can i solve this?
... View more
03-15-202202:34 AM
|
0
|
1
|
468
|
POST
|
It works as expected. So now i like to set the caption and tooltip of this button with a string from a resource file like in a XAML file. Is there a way to do this in the DAML file? With {x:Static Resources.ButtonCaption_SaveMetadataPDF} it does not work.
Regards
Christian -->
Hello, i use the ArcGIS Pro 2.7 SDK to create a small AddIn. In the DAML file i defined a button in a module like so:
06-23-202109:26 AM
|
0
|
1
|
854
|
POST
|
Ohh, i would add something like this: if (item != null) { //... the other code } because if the object cannot be converted with "as" the result is a null value. Regards Christian
... View more
02-09-202107:27 AM
|
0
|
1
|
1556
|
POST
|
对不起我回复晚了。这就是我寻找for. Thank you very much! This is my code now: private string _SDEextension = ".sde"; protected async override void OnClick() { GDBItem item = ProApp.ContextMenuDataContext as GDBItem; if (!string.IsNullOrWhiteSpace(item.Path)) { if (!item.Path.Contains(_SDEextension)) MessageBox.Show("Only SDE databases."); else { //Clear the path until it ends with .sde (only for SDE required). string geodatabasePath = item.Path; while (!geodatabasePath.EndsWith(".sde", StringComparison.OrdinalIgnoreCase)) { string[] split = geodatabasePath.Split(new string[] { "\\" }, StringSplitOptions.None); geodatabasePath = geodatabasePath.Replace(string.Concat("\\", split.Last()), string.Empty); } await QueuedTask.Run(() => { //Open the SDE database and access the table where all items are defined. using (Geodatabase geodatabase = new Geodatabase(new DatabaseConnectionFile(new Uri(geodatabasePath)))) { using (Table table = geodatabase.OpenDataset
Activity Feed
Contact Me
|