Geoprocessing code block help

187
2
Jump to solution
03-14-2022 10:23 AM
Chelsea_Trusdell
New Contributor

I

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

@Chelsea_Trusdell wrote:

I want to write a script that adds a text field to the roads.shp feature class called FERRY. This new field
should be populated with values of YES and NO depending on the value of the FEATURE field. If the value of the FEATURE field is ‘Ferry Crossing’, the value of the FERRY field should be YES – otherwise the value of the
FERRY field should be NO.

I want to write the code that Uses a field calculation code block section within the geoprocessing tool. do i create a function in the code block or use da.cursor method within the code block. i don't have experience writing in code block before. 

thanks!


 

What have you got so far?

Did you see the code block examples in the help?  There are lots in the Community as well

Examples of using Calculate Value—ArcGIS Pro | Documentation

 


... sort of retired...

View solution in original post

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

@Chelsea_Trusdell wrote:

I want to write a script that adds a text field to the roads.shp feature class called FERRY. This new field
should be populated with values of YES and NO depending on the value of the FEATURE field. If the value of the FEATURE field is ‘Ferry Crossing’, the value of the FERRY field should be YES – otherwise the value of the
FERRY field should be NO.

I want to write the code that Uses a field calculation code block section within the geoprocessing tool. do i create a function in the code block or use da.cursor method within the code block. i don't have experience writing in code block before. 

thanks!


 

What have you got so far?

Did you see the code block examples in the help?  There are lots in the Community as well

Examples of using Calculate Value—ArcGIS Pro | Documentation

 


... sort of retired...
0 Kudos
Darrin-Smith
New Contributor II
0 Kudos