1

I am having a problem in migrating from Vbscript to Python for ArcGIS Pro.

Building 5, Street 6

What is wrong in this expression?

"{}:{}:{}:{}:{}:{}".format("Building ",!Building_Number!," , ",!Street_Type!), " " ,!Street_Number!
7

First glance - it looks like your parentheses in the wrong place:

"{}:{}:{}:{}:{}:{}".format("Building ",!Building_Number!," , ",!Street_Type!, " " ,!Street_Number!)
| improve this answer | |
  • 1
    This would return a string of values separated by colons. – smiller Jun 17 '19 at 21:32
2

Try Code Block:

def bs(bnumber, stype):
    return "Building {0}, Street {1}".format(bnumber,stype)

Call with:

bs(!Building_number!,!Street_Type!)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.