AnsweredAssumed Answered

Convert VB Expression to Python

Question asked by CoA_Robert_Westerberg on Oct 9, 2019

Hi Everyone,


I had an expression written in VB before upgrading to Pro. It seems that Pro does not support VB. I am having to convert the below to Python 3 in a new model but I just can't get it to work...


I want to grab a value in a field (PIPE_COND_SCORE) and multiply it by a value in a variable (PIPE_COND_WEIGHT) and insert the resulting value into a new field called TOTAL_SCORE.



The old VB is below and this was working in Desktop 10.3, for the sake of testing I have only added the first variable to the new model at this stage):




From my research the expression should look something like this (using just the PIPE_COND_SCORE as example):




The above expression seems to call up the field correctly. The issue seems to be the calling up of the variable.


Any help would be greatly appreciated.