Select to view content in your preferred language

ArcGIS Pro Task - calculate field

1483
6
03-19-2018 05:28 AM
TorbjørnDalløkken2
Frequent Contributor

I'm working with a quite small and hopefully easy task in ArcGIS Pro, but I'm having some trouble getting the correct result.

We have two featureclasses, one with polylines and one with points. The points are all snapped to the lines. One of the fields in the polyline-class contains a value for rotation, and we want to transfer the value to the corresponding points. 

I've created a task with the following steps:

1. create point (line snappable)

2a. select layer by location (line based on point)

2b. (when exiting the step) copy attribute from line

3a. Save edits

3b. (when starting the step) calculate field in pointclass

The steps seems to run fine, but the step 3b does not work. The field is not calculated with the copied values.

The fieldtype of the rotation is double. If I try to calculate the copied attribute to a field with the fieldtype text, it works ok.

Regards, Torbjørn

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

You would have to show your data and the calculate field expression.  If it works with text but not a number then something is causing this

0 Kudos
ProvidenceAdu
Occasional Contributor

Hi Dan, 

Please I am trying to use ArcGIS Pro tasks for some of our repetitive workflows.

1. How do I automatically configure the Merge tool to Merge Existing features instead of New features, when I automate it in Task? It automatically runs new features and create unwanted duplicates (see attached Image)

2. How do I set a fixed scale for features (eg. 1:8,00), without manually typing the scale in? which command in tasks provides that functionality?

Thank you,


0 Kudos
AndrewHargreaves2
Deactivated User

Hi Dan Patterson

I'm having a very similar issue when attempting to run a field calculation on features appended using a Pro Task. The append works fine, but I ask the Task to also calculate three values on  those newly appended "Features or records created in this step" . These field calc's fail to occur. Screenshots of my setup are below:

0 Kudos
DanPatterson_Retired
MVP Emeritus

Andrew, I don't use tasks, but I can only guess one of several possibilities.

Are the fields you are calculating into of the right type (is you show Status = 1... so Status is a numeric field?)

The fields you are calculating into do they exist in the table that you are appending to? or in the table you are appending?  The former would be correct

0 Kudos
AndrewHargreaves2
Deactivated User

Dan Patterson‌ - yes, status exists and is a numeric field

0 Kudos
DanPatterson_Retired
MVP Emeritus

Ok... I misread append as join, so skip the second comment.

It is the order of when things get done.  My guess by reading your inputs, is that I am not sure what to expect

since it looks like it is supposed to calculate those fields after the records have been added, but I don't know if you need to 'do' something prior to that step

0 Kudos