Error Model Builder arcgis 10.5 in "Calcute value"

752
6
10-02-2018 02:24 PM
Frankde_la_Barra
New Contributor

both in mode 1 or mode 2 when executing "Calculate value" the model gives the same error. With the examples provided by "Arcgis Help" I have the same error.
my question because it gives me the error "The name contains invalid characters" ?. my current team is with windows 10 updated, if the platform is compatible for Windows 8 environment. However, the only time I could successfully execute this command is with the command "Replace", in this way ".replace ('-', '_')

modo 1

modo 1

modo 2

modo 2

resultado

resultado

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

what is it you are trying to do because your expressions and code block aren't correct.

are you trying to add something to a variable if it equals something?

you mention replace... replace requires an input value in the string to replace and an substitution value

0 Kudos
Frankde_la_Barra
New Contributor

the same problem I have if I directly variable "Hello", the examples of "Arcgis Help" also do not work

0 Kudos
DanPatterson_Retired
MVP Emeritus

Using Calculate Value output as Buffer distance

I suspect the issues come with the lack of specifically indicating that you would need an input oval that defines what 'A' and/or 'B' is

So in this example, nothing is going to work unless you have a 'Value'  oval

Python method replace example

0 Kudos
Frankde_la_Barra
New Contributor

As I said before, in version 10.4 "% Variable%". replace ("-", "_") but version 10.5 does not work like this, it works as follows "% Variable%". replace ('-', '_') in arcgis 10.5

0 Kudos
Frankde_la_Barra
New Contributor

As I said before, in version 10.4 "% Variable%". replace ("-", "_") but version 10.5 does not work like this, it works as follows "% Variable%". replace ('-', '_') in arcgis 10.5

0 Kudos
Frankde_la_Barra
New Contributor

"%N1%".replace('/','_')

0 Kudos