POST
|
Hey, This topic is almost 5 years old, but I got a request right now from a customer asking if we can do Line of Sight analysis in 2D. And this is not for the first time we are getting this question. Are there any new findings here? Is this possible in the meantime? Are there workarounds for (creating in 3D and exporting to 2D)? Cheers, Max
... View more
12-01-2022
11:07 PM
|
0
|
1
|
414
|
POST
|
I got no answer so far and I don't have a real solution. Possible ideas: Install an ArcGIS product which delivers arcpy (Pro or Server) on an machine which is used in the build process. But: no idea if this will work. And you are dependent on this installation, which could change with an auto update. Not really preferred. Try to isolate arcpy (and its dependencies) and include it in the version control system. No idea if this is possible with an acceptable effort. At least it will be a lot of data (my arcpy has 1,15 GB) in vcs. Even not sure if this is feasible because of the underlying ArcObjects core. Try to mock the arcpy calls. In my tests this works fine, but of course you will not be able to test all components with real conditions. What are your thoughts and attempts so far?
... View more
04-12-2022
03:15 AM
|
0
|
0
|
1289
|
POST
|
Well, we already use the arcgis for python API additionally, but it does not cover all our use cases. That's why we also need the arcpy module.
... View more
01-27-2022
12:17 AM
|
0
|
0
|
1366
|
POST
|
Hey guys, We are actually developing Web Tools based on ArcGIS Pro 2.8 to publish in ArcGIS Enterprise 10.8.1. We want to establish unit tests and want to run these tests in Azure DevOps Pipelines. While in a local environment I have an ArcGIS Pro installed, of course this is not the case in an Azure DevOps environment. And simply trying to install arcpy module with python install failed. What is the recommended scenario from Esri to establish this? Kind regards, Max
... View more
01-25-2022
08:44 AM
|
1
|
8
|
1424
|
POST
|
Depends on what you want to do: Either you can listen to the MouseWheel Event or you try to react after in the ViewpointChanged Event and set the viewpoint to the allowed focus. Maybe this gives you an idea: https://developers.arcgis.com/net/wpf/sample-code/geoview-viewpoint-synchronization/
... View more
12-01-2021
04:56 AM
|
0
|
0
|
1157
|
POST
|
Hi Sam, it seems that we could locate the reason for our problem. There were some texts in our layout that were apparently responsible for the problem. When we removed the texts, printing worked without any problems. We have found a patch that should fix the problem. Initial tests are promising. ArcGIS Server 10.8.1 Print Service and Text Element Patch Maybe this will work for you too. Kind regards, Max Kind regards, Max
... View more
08-22-2021
11:56 PM
|
0
|
1
|
1292
|
POST
|
Hi guys, I have a strange behaviour with my script which I wrote for a customer. Just the relevant lines ... import arcpy
import os
import sys
import logging
import logging.config
from datetime import datetime
# CONFIG Paths
Pdf_Path = r"C:\PrintServer"
Log_Path = r"C:\PrintServer\log"
Aprx_File = r"D:\data\PrintServer\COVID19_Print.aprx"
def main():
# Input Layout template
Layout_Template = arcpy.GetParameterAsText(0)
#open the ProProject
try:
aprx = arcpy.mp.ArcGISProject(Aprx_File)
layouts = aprx.listLayouts(Layout_Template)
except:
raise
#print each layout found
out_files = []
for lyt in layouts:
try:
now = datetime.now()
tmp_file_name = lyt.name + "_" + now.strftime("%Y%m%d_%H%M%S") + ".pdf"
Temp_File = os.path.join(arcpy.env.scratchFolder, tmp_file_name)
#This line always results in an OSError
lyt.exportToPDF(Temp_File, resolution = 300)
Output_File = os.path.join(Pdf_Path, tmp_file_name)
import shutil
shutil.move(Temp_File, Output_File)
out_files.append(Output_File)
except:
raise
arcpy.SetParameter(1, out_files)
if __name__ == '__main__':
try:
main()
except:
import traceback
logging.error(traceback.format_exc()) The idea is to provide a GPService which takes a public WebMap, uses a predefined ArcGIS Pro Project (.aprx) also published with the GPService, reading a layout and printing this layout as pdf document. In my tests on my machine and three different ArcGIS servers, this has been no problem. Also running on the customers ArcGIS Pro client worked as expected, but when rolling out on the customers server, we always get an OSError when executing the ExportToPDF method. What we already verified/tested: different file directories: hard coded temp folder or the scratch folder from arcgis shortened the file and directory names tripple checked write permissions, we have used different users, even full previliged from their IT department executed the script via GPService or via python shell, both results in the same OSError tested with ExportToJPG and ExportToPNG, both also produces the same error tested, if a PDF program is necessary (it is not) tested, if a PDF in general could be produced with python (is possible) So, this works: #Create the file and append pages
pdfDoc = arcpy.mp.PDFDocumentCreate(pdfPath)
pdfDoc.appendPages(referencePdf)
pdfDoc.saveAndClose() And now I don't have any other idea. Anybody of you have any? Has anybody a deeper look into that tool and can say, why this error could happen? Kind regards, Max
... View more
06-22-2021
12:58 AM
|
1
|
4
|
1464
|
POST
|
In fact, there seams not to be a method to directly create a polygon from an Envelope. But this is a way you can do it: private Geometry CreateFromEnvelope(Envelope envelope)
{
var builder = new PolygonBuilder(envelope.SpatialReference);
builder.AddPoint(new MapPoint(envelope.XMin, envelope.YMin));
builder.AddPoint(new MapPoint(envelope.XMin, envelope.YMax));
builder.AddPoint(new MapPoint(envelope.XMax, envelope.YMax));
builder.AddPoint(new MapPoint(envelope.XMax, envelope.YMin));
return builder.ToGeometry();
} Cheers
... View more
05-03-2021
08:39 AM
|
1
|
1
|
989
|
POST
|
Hi Luke, The missing .xml you have mentioned to be on a new location is now missing again Seems it has been moved or deleted. Kind regards, Max
... View more
04-18-2021
11:44 PM
|
0
|
0
|
418
|
POST
|
Hi Michael, I am not allowed to post Ideas, I think this is a limitation for distributors, but I am not sure about that. But thanks for your respond. Kind regards, Max
... View more
03-11-2021
12:43 AM
|
0
|
0
|
927
|
POST
|
You have 2 issues in your code. That's the correct way. WhereClauses are missing a quote: QueryParameters citiesNameQuery = new QueryParameters
{
WhereClause = $"AREANAME='{SearchTextBox.Text}'",
Geometry = MyMapView.GetCurrentViewpoint(ViewpointType.BoundingGeometry).TargetGeometry,
OutSpatialReference = MyMapView.SpatialReference
};
QueryParameters countiesNameQuery = new QueryParameters
{
WhereClause = $"NAME='{SearchTextBox.Text}'",
Geometry = MyMapView.GetCurrentViewpoint(ViewpointType.BoundingGeometry).TargetGeometry,
OutSpatialReference = MyMapView.SpatialReference
};
QueryParameters statesNameQuery = new QueryParameters
{
WhereClause = $"STATE_NAME='{SearchTextBox.Text}'",
Geometry = MyMapView.GetCurrentViewpoint(ViewpointType.BoundingGeometry).TargetGeometry,
OutSpatialReference = MyMapView.SpatialReference
}; And you referenced the same table three times, you need to use the associated tables: FeatureQueryResult citiesQueryResult = await citiesTable.QueryFeaturesAsync(citiesNameQuery);
FeatureQueryResult countiesQueryResult = await countiesTable.QueryFeaturesAsync(countiesNameQuery);
FeatureQueryResult statesQueryResult = await statesTable.QueryFeaturesAsync(statesNameQuery); Then it will work.
... View more
03-11-2021
12:35 AM
|
1
|
1
|
970
|
POST
|
Hi, One of our customers has a requirement to show a display grid in Swiss coordination system LV95 ("CH1903+ LV95" or WKID 2056) or LV03 ("CH1903 LV03" or WKID 21781) in a runtime application. The representation of a display grid is basically possible and the ArcGIS Runtime offers 4 standard grids for this purpose. All of them derive from a base class Grid, and my idea was to implement a custom grid taking a wkid and deriving from this base class, as it has: public abstract class Grid Unfortunately this will not work because the constructor of the base class is internal and therefore a derived class is impossible. Is it not thought to display a custom grid? Or is there a way to do this that I'm overlooking? Are there any plans to improve this feature? What is the way you would recommend to achieve a custom grid? Kind regards, Max
... View more
02-23-2021
09:31 AM
|
0
|
2
|
991
|
POST
|
Hi Uma, thanks for your answer. I tried it with the local public folder as described in "UsePublicConfigurationFolders", worked for me. By the way: even with a german language (where parts of the path are translated): I tested a little bit with the RegisterAddin.exe. I couldn't see what the installation process was necessary for, because the extension was always used, no matter if I just copied it into the directory or if I executed RegisterAddin.exe additionally. Where I could see a difference was during the uninstallation process: If the file was in the user directory, it was deleted. If it was in the public directory, it was preserved. Can you tell me if and why the RegisterAddin.exe is needed? Kind regards, Max
... View more
09-27-2019
01:19 AM
|
0
|
1
|
1619
|
POST
|
Hi, In the ArcGIS Pro SDK documentation is mentioned, how you have to install a configuration. I have some questions about this topic: The documentation says: "RegisterAddin.exe" validates the configuration and copies it to the configurations' well-known folder: C:\Users\<UserName>\Documents\ArcGIS\AddIns\ArcGISPro\Configurations What if I want to install the configuration not only for one user, but for all? Do I have to use a different folder? Do I have to execute the tool more than once? What if I want to script the installation process. Could I use this tool and work with parameters? If I want to uninstall a configuration, is it enough to delete the proConfigX file in the user folder? Kind regards, Max
... View more
09-26-2019
04:46 AM
|
0
|
3
|
1979
|
POST
|
Hi, I've been looking into this a little bit more. In generel my storing mechanism worked, the only problem is that the DLLs and therefore the Config are located in a temporary directory at runtime and are changed there as well. If the application is started a second time, a new temporary directory is apparently created and the previously saved settings are therefore not available. I have now helped myself by writing my own small application that reads the proConfigX file, changes the settings inside it and saves them back. This is not optimal either, because you have to reinstall the extensions every time you change the settings, but it seemed to me to be the best solution so far. Kind regards, Max
... View more
09-26-2019
04:37 AM
|
2
|
0
|
604
|
Title | Kudos | Posted |
---|---|---|
2 | 09-20-2019 03:24 AM | |
2 | 09-26-2019 04:37 AM | |
1 | 01-25-2022 08:44 AM | |
1 | 06-22-2021 12:58 AM | |
1 | 05-03-2021 08:39 AM |
Online Status |
Offline
|
Date Last Visited |
09-13-2023
10:45 AM
|