Skip to main content

Questions tagged [python-parser]

For questions about ArcGIS Python Parser for labelling expressions and field calculations

1 vote
1 answer
62 views

ArcGIS Pro - Python If-Elif-Else in field calculator

I am trying to populate a field with a text string based on a combination of two other fields. The field !yearsSinceAct! is a decimal (float) of years. !OperationalStatus! is a text field describing ...
Richard Frieman's user avatar
0 votes
1 answer
52 views

Getting Error from ModelBuilder (calculate values)

I want to remove the last 7 character from parsepath (%Value%) what is wrong with this code?
Arda's user avatar
  • 3
0 votes
0 answers
104 views

How to give numbers by order to column in ArcGIS Pro through FieldCalculator and Python

How to give numbers by order to column in ArcGIS Pro through FieldCalculator and Python? Sequence doesn't work as I need. I sorted X_North and need to give a numbering (from 1 to 296) to new column. I ...
Sandi's user avatar
  • 17
0 votes
1 answer
85 views

Ignore labeling when field has specific word - ArcMap 10.8

Looking to add a function of my labeling expression to not label feature with the word 'TO". For example, some roads are named '5th TO I-10'. I am using Python as the parser with advanced checked....
AFang's user avatar
  • 3
0 votes
1 answer
129 views

Field Calculator populating a new field with strings based on old field with integers

I have two fields, one is old, Ftype, one is new, Ftype_name. I would like to have python read the numbers in Ftype and populate Ftype_name with the string. I used to know how to do this before they ...
R. Ian Cunningham's user avatar
1 vote
1 answer
275 views

Conditional Label Expression in ArcGIS Pro

I have a set of wells I am trying to label with contaminant data using python. I'd like the well name and constituents stacked but also formatted a certain way. This is what I have so far: def ...
Jeff Fitzgibbons's user avatar
0 votes
0 answers
64 views

Calculate Field calculates once

Why did Calc Field work the first time I wrote the following code, but not when I re-ran it with an additional criteria? I figured out the code I needed to classify all fields in a new attribute ...
Ryan Stephenson's user avatar
1 vote
1 answer
100 views

Using ModelBuilder in ArcGIS Pro

I am trying to create a ModelBuilder model to calculate factor of safety for shapefiles. However, whenever I try to run the python my 'Slope' comes up as undefined and I have no clue what to do. Here ...
Matt's user avatar
  • 11
1 vote
1 answer
297 views

Add sequential ids to a column using calculate field

So I have a bunch of ObjectIDs that have null id values. These null values start from ObjectID 20866 to 21899. ObjectID 20865 has id value 30542 so the next id value for ObjectID 20866 would be 30543 ...
Arthur_Morgan's user avatar
0 votes
1 answer
69 views

Field Calculator If Statement

I am new to python and was trying to populate a decade field based on an if else statement on another field that contains parcel years. The code block is below: def ifBlock(Parcel_Year_Built, ...
Androoo's user avatar
1 vote
2 answers
314 views

Using ArcGIS Pro field calculator: check values one column and enter specific data in a second column

I have two fields and I want to use field calculator to check the column Datierun_1 (alias is Datierung) for certain words (in this case "Achaemenid"). In case it finds a match it should ...
ArcheoHorst's user avatar
0 votes
1 answer
105 views

Populating field based on value of another field using Boolean OR [closed]

I am trying to enter values for a new column, FloodZone, based on another column's (NEW_ZONE) values. I am doing this in ArcGIS Pro 3.1 using the Calculate Field Tool via Python. However, I am getting ...
Arthur_Morgan's user avatar
2 votes
1 answer
203 views

Using Python to change Callout Outline color in ArcGIS Pro

I am using ArcGIS pro to create some maps. There is a polyline feature layer where all of the important data comes from, which is determined by the fields "Direction" with domain of North, ...
Laura's user avatar
  • 21
0 votes
0 answers
187 views

How to convert the RGB color model to the HSV color model in ArcGIS Pro

How to convert the RGB color model to the HSV color model in ArcGIS Pro with Python parser? I'm trying Calculate Field Tool, everything seems correct but it doesn't work! Method (1) Code Block: ...
Mohammad Hosseini's user avatar
1 vote
1 answer
89 views

ArcMap Label (Python)

SOLUTION: I was able to do it with help of a colleague by creating a list instead, I'm assuming the tuple was was a quirky bug; def FindLabel ( [PIPE_INTERNAL_DIAMETER] ): lst = ['1"', '2"'] ...
Average_LukeGIS's user avatar

15 30 50 per page
1
2 3 4 5
46