POST
|
I'm having an arcpy issue where I'm trying to pull a spatial reference object from the currently active map to use to create a point geometry. It works fine if I pull it from the first layer in the ToC: insr = arcpy.Describe(layers[0]).spatialReference But if I pull it from the currently active map: aprx = arcpy.mp.ArcGISProject("CURRENT")
m = aprx.listMaps()[0]
insr = m.spatialReference then I get an error. Both the layer and the map return a spatial reference object, but when I use the one from the map, it ends up erroring out on this line: point1 = arcpy.PointGeometry(arcpy.Point(extent.XMin,extent.YMin),insr) Traceback (most recent call last): File "<string>", line 12, in <module> File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\arcobjects\geometries.py", line 86, in __init__ super().__init__(inputs, spatial_reference, has_z, has_m) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\arcobjects\mixins.py", line 223, in __init__ self._arc_object = gp.CreateObject('geometry', self.__type_string__, File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 43, in gp_fixargs new_args.append(gp_fixarg(arg, string_results, pass_arc_object)) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 30, in gp_fixarg if isinstance(arg, Result) and string_results: RuntimeError: SpatialReference: Get attribute __class__ does not exist The attached images are an example of the object it's returning where insr is the SR object from a layer and insr2 is the object from the map. They are different projections but that shouldn't be an issue. If I use exportToString() on the map object and then use that to loadFromString() on a new SR object then it will also work, but that seems like a needless workaround. Thanks in advance for any help.
... View more
01-27-2023
07:11 AM
|
0
|
1
|
1259
|
POST
|
The option in the above screenshot is available in the ArcMap right click context when drawing a rectangle. I can't seem to find the same option in ArcGIS Pro, and my searches online have been fruitless. Can anyone point me to this feature in Pro? Thanks!
... View more
10-24-2019
05:56 AM
|
0
|
3
|
1076
|
POST
|
Christian, Thank you very much for your help. Contacted support and they were going to re-send me the invitation. Waited an hour and it didn't come, called back and the second person I talked to said she sees why it might not have been delivered. I received it while I was on the phone with her. Very friendly folks over there and they got me everything I needed. Thanks again for your help.
... View more
06-07-2019
02:02 PM
|
1
|
1
|
853
|
POST
|
Thank you for the information, but I don't see any way to activate an online account. I have a public acct, which Pro reminds me is public when I try to log in and can't use it. When I purchased the personal use license it didn't give any instructions on activating anything else online. Is there a particular way or instructions you can point me to? Sorry to sound obtuse about the process. Thanks!
... View more
06-07-2019
11:28 AM
|
0
|
3
|
853
|
POST
|
I am not part of an organization, and from everything I've read it looks like you have to be a named user with an organization or pay for an ArcOnline subscription on top of the ArcGIS Pro subscription. Is this correct? Is there no way for an individual to use it without paying at least $600 (personal license $100 + arconline $500) a year? In the personal use license description it says it includes Pro, but I can't seem to license it. My license only says it's good for 10.1-10.7. From the description: The annual term license includes : ArcGIS Desktop Advanced ArcGIS Pro ArcMap, ArcCatalog ArcGIS Online Creator User Type I don't mind paying the $100/year for 10.7, but I would really like to try out Pro. Thanks for any help.
... View more
06-07-2019
05:55 AM
|
0
|
5
|
999
|
Title | Kudos | Posted |
---|---|---|
1 | 10-24-2019 09:18 AM | |
1 | 06-07-2019 02:02 PM |
Online Status |
Offline
|
Date Last Visited |
03-03-2024
06:41 PM
|