POST
|
Converted the four Parameters inputLayer, symbologyLayer and ValueField1 and ValueField2 to selectable params in my script. No changes like before. I've written some scripts before without dialogs - just running commands. They all worked well. So hardcoded params can be used.
... View more
10-26-2017
06:29 AM
|
0
|
0
|
2176
|
POST
|
Thank's for your answer. I've tried: import arcpy from arcpy import env env.workspace = r"C:\ArcGIS\Projects\MyProject6" arcpy.MakeFeatureLayer_management("myFc", "myFc_lyr") inputLayer = "myFc" symbologyLayer = "myFc.lyrx" symbologyFields = [["VALUE_FIELD", "StrKlasse", "StrKlasse"],["VALUE_FIELD", "Abschnitt_Ast", "Abschnitt_Ast"]] arcpy.ApplySymbologyFromLayer_management (inputLayer, symbologyLayer, symbologyFields) All sources are in the same Project folder. The script runs and completes with no error, but nothing is changed.
... View more
10-26-2017
02:03 AM
|
0
|
5
|
2176
|
POST
|
ArcGIS Pro 1.4, 2D-Map I'm trying to change the symbology of a featureclass through a layerfile (.lyrx): import arcpy arcpy.MakeFeatureLayer_management("myFc", "myFc_lyr") inputLayer = "myFc" symbologyLayer = "myFc.lyrx" symbologyFields = [["VALUE_FIELD", "StrKlasse", "StrKlasse"],["VALUE_FIELD", "Abschnitt_Ast", "Abschnitt_Ast"]] arcpy.ApplySymbologyFromLayer_management (inputLayer, symbologyLayer, symbologyFields) Running the commnds in the python-window, the symbology will be changed as expected, but in a python script from a toolbox nothing happens. The attributes in lyrx-file and the fc/layer match correctly. Thanks for any solution.
... View more
10-26-2017
12:40 AM
|
2
|
10
|
2904
|
POST
|
Problem is solved. Setting the viewing options in the mapframe properties to "none" enables the python code to run properly.
... View more
10-13-2017
03:32 AM
|
2
|
0
|
3435
|
POST
|
ArcGIS Pro 1.2 2D Map If tried this code: print(mf.camera.scale) >> 125000.0 mf = myMapframe mf.camera.type = "MAP" mf.camera.setExtent(extent) mf.camera.scale = 500000.0 print(mf.camera.scale) >> 125000.0 so, nothing happend Any ideas? Thanks Tom
... View more
12-20-2016
08:58 AM
|
0
|
4
|
4068
|
Title | Kudos | Posted |
---|---|---|
2 | 10-26-2017 12:40 AM | |
2 | 10-13-2017 03:32 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|