POST
|
I don't know if this is true or if the files are still hiding somewhere but a restart of the vm might have emptied out some stuff.
... View more
03-21-2022
10:32 AM
|
0
|
0
|
1734
|
POST
|
yes I am freeing up space and would love to get rid of this 2.5+ GB.
... View more
03-21-2022
10:22 AM
|
0
|
1
|
1736
|
POST
|
I have pro running on a vm with limited disk space. When I tried updating this morning, the update didn't finish because of an "out of space" error. I canceled the install and in the process my machine lost over 2.5 GB of space. I was thinking this might be an issue for this machine so I checked storage space before I started. Where would've ArcPro saved any files that were downloaded?
... View more
03-21-2022
07:51 AM
|
0
|
11
|
2088
|
POST
|
I have a data grid holding point features and a row event handler to zoom to the feature when row is clicked. Each time a row is clicked, the map zooms to the feature but keeps zooming in. I want to have the map always zoom to 1:1,000. Each time the row is clicked, it zooms in at a ratio of 0.56. 1,000 -> 563 -> 316 -> 178... private async void ZoomToSelection(long objid)
{
var mapView = MapView.Active;
if (mapView == null) return;
await QueuedTask.Run(() =>
{
FeatureLayer pLayer = MapView.Active.Map.Layers.First(layer => layer.Name.Equals(Properties.Resources.permitsName)) as FeatureLayer;
List<long> longs = new List<long> { objid };
MapView.Active.Map.SetSelection(new Dictionary<MapMember, List<long>> { { pLayer, longs } });
MapView.Active.ZoomToSelectedAsync();
});
} I tried getting the camera and setting the scale and then zooming to the new camera but the map never zooms after the first click. On subsequent clicks, nothing happens. Camera camera = new Camera();
camera = mapView.Camera;
camera.Scale = 1000;
MapView.Active.ZoomToAsync(camera); EDIT------------------------------------------------ If I put the camera code before I call the zoom async. I get an acceptable result. I set the scale at 1:1,785 to get close to the 1,000. ArcPro 2.9
... View more
12-23-2021
08:08 AM
|
1
|
1
|
459
|
POST
|
This pro addin was partly a port from a desktop addin so some arcobject type code was brought over. I had everything running and then I guess one of the pro updates stopped it from working. var progDlg = new ProgressDialog("Running Table to Table", "Cancel", 100, true);
progDlg.Show();
var progsrc=new CancelableProgressorSource(progDlg);
var parameters = Geoprocessing.MakeValueArray(Properties.Resources.csvFilePath, Properties.Resources.ltGDB);
await Geoprocessing.ExecuteToolAsync("conversion.TableToGeodatabase", parameters, null, new CancelableProgressorSource(progDlg).Progressor, GPExecuteToolFlags.Default);
progDlg.Hide();
... View more
12-13-2021
11:11 AM
|
0
|
0
|
539
|
POST
|
Back in May, everything ran just fine. The add-in has10 different geoprocessing calls in the same format and no problem. It seems that upgrading ArcPro broke this. I'll try finding a more Pro solution.
... View more
12-13-2021
05:02 AM
|
0
|
0
|
546
|
POST
|
I created an add-in earlier this year. Used it for a few months. We went in a different direction but the client and their staff kinda fell short. So I went to go back and use the earlier add-in and now the TableToGeodatabase_conversion breaks pro. There is no error and pro just disappears. This had been working before and I can run the conversion from the Geoprocessing in Pro and Desktop with the same files and it runs fine. The code always bails at line 10. Nothing is being caught and pro just closes and I get the send report "ArcGIS Application has stopped working" dialog. I had upgraded to 2.8 sometime in-between. I upgraded to 2.9 today. Geoprocessor gp = new Geoprocessor();
gp.OverwriteOutput = true;
gp.AddOutputsToMap = true;
IGeoProcessorResult myresult = new GeoProcessorResult();
IVariantArray parameters = new VarArray();
parameters.Add(Properties.Resources.csvFilePath);
parameters.Add(Properties.Resources.ltGDB);
try
{
myresult = (IGeoProcessorResult)gp.Execute("TableToGeodatabase_conversion", parameters, null);
while (myresult.Status == esriJobStatus.esriJobExecuting)
Thread.Sleep(1000);
parameters.RemoveAll();
parameters.Add(Properties.Resources.gdbTablePath);
parameters.Add("PARCELID");
parameters.Add("!PARCELID!.replace('a','')");
myresult = (IGeoProcessorResult)gp.Execute("CalculateField_management", parameters, null);
gp = null;
}
... View more
12-10-2021
01:23 PM
|
0
|
3
|
591
|
POST
|
I had is formatted that way to reduce the number of lines I had to look at. But I guess the 10.8.1 python didn't like the way I formatted the function. I had tried it using "" + \ to format but that came out formatted as a single line as well. The triple quotes did the trick. I think I'm going to eventually write files with the functions and read them from there. Thanks!
... View more
10-26-2021
09:49 AM
|
0
|
0
|
1687
|
POST
|
yes. However, I use a Task Manager to start the script and explicitly state the path to the python exe I want to use. Also, I have both pro and desktop python environments in my Visual Studio and activate them as needed during development.
... View more
10-26-2021
08:31 AM
|
0
|
0
|
1709
|
POST
|
updated a machine used for nightly processing from 10.7.1 to 10.8.1. Now I am having issues where I am getting a syntax error on a CalculateField with a function and returns ERROR 000989: Python syntax error: Parsing error SyntaxError: invalid syntax (line 1) This is the line I have been using for a couple years with no issues. arcpy.management.CalculateField(finalTable, "SiteAddress", "myFun(!LocationStartNumber!,!StreetDirection!,!StreetName!,!StreetWay!,!UnitNumber!)", "PYTHON_9.3", "def myFun(LocationStartNumber,StreetDirection,StreetName,StreetWay,UnitNumber):\\n if UnitNumber is None:\\n UnitNumber = ''\\n if LocationStartNumber == 0:\\n if StreetName == 'TBD':\\n return StreetName \\n else:\\n val = '{} {} {} {}'.format(StreetDirection,StreetName,StreetWay,UnitNumber)\\n return val.strip()\\n else:\\n return '{} {} {} {} {}'.format(LocationStartNumber,StreetDirection,StreetName,StreetWay,UnitNumber)\\n") I took the calculate out of the script and run it in ArcMap for now. But not a long term solution. What is going on?
... View more
10-26-2021
08:17 AM
|
0
|
5
|
1720
|
POST
|
yes... it was "OutFileName" in quotes instead of the variable. Thanks.
... View more
10-18-2021
06:49 PM
|
0
|
0
|
1163
|
POST
|
Developing and ArcPro add in and cant get the ExportToPDF to work for my report. I can export it from Share->ExportReport no problem. But doesn't work in code. No errors or anything. Code runs through just fine but no pdf is ever created. I found the code here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Reports#export-report-to-pdf Below is the code being used. private async void CnclReport_Click(object sender, RoutedEventArgs e)
{
System.Windows.Forms.SaveFileDialog saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
saveFileDialog1.Filter = "PDF File|*.pdf";
saveFileDialog1.Title = "Save a PDF File";
saveFileDialog1.FileName = "CouncilReport.pdf";
saveFileDialog1.ShowDialog();
if (saveFileDialog1.FileName != "")
{
await QueuedTask.Run(() =>
{
ReportProjectItem reportProjItem = Project.Current.GetItems<ReportProjectItem>().FirstOrDefault(item => item.Name.Equals("CouncilReport"));
Report report = reportProjItem?.GetReport();
var exportOptions = new ReportExportOptions
{
ExportPageOption = ExportPageOptions.ExportAllPages,
TotalPageNumberOverride = 0
};
PDFFormat pdfFormat = new PDFFormat();
pdfFormat.Resolution = 300;
pdfFormat.OutputFileName = saveFileDialog1.FileName;
report.ExportToPDF("CouncilReport", pdfFormat, exportOptions, false);
});
}
else
{
MessageBox.Show("Please provide a file name");
}
MessageBox.Show("exported");
} -edit Instead of trying to do it that way, I used a GP Tool. Found this from: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Geoprocessing var progDlg = new ProgressDialog("Exporting Council Report", "Cancel", 100, true);
progDlg.Show();
var progsrc=new CancelableProgressorSource(progDlg);
var parameters = Geoprocessing.MakeValueArray("CouncilReport", saveFileDialog1.FileName);
await Geoprocessing.ExecuteToolAsync("management.ExportReportToPDF", parameters, null, new CancelableProgressorSource(progDlg).Progressor, GPExecuteToolFlags.Default);
progDlg.Hide();
... View more
10-15-2021
08:03 AM
|
0
|
2
|
1212
|
Title | Kudos | Posted |
---|---|---|
1 | 08-08-2024 07:13 AM | |
1 | 06-03-2024 03:00 PM | |
1 | 06-03-2024 08:49 AM | |
2 | 03-26-2024 12:57 PM | |
1 | 09-27-2023 12:15 PM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|