AnsweredAssumed Answered

String in attribute

Question asked by Mortensen91 on Oct 12, 2018
Latest reply on Oct 25, 2018 by CLau-esristaff

Hello

 

I was wondering if is possible to have a string in an attribute that changes a part of the code. I was looking into the scatter opperation which can controlled by changing the scatterMean from "uniform" to "gaussian". instead of writing a code like this 

 

@Range ("Uniform", "Gaussian")

attr scatterType = "Uniform"

 

lot --> 

   case scatterType ==  "Uniform" : scatter(surface, 10, uniform) {Point}

   case scatterType == "Gaussian" : scatter(surface,10, gaussian) {Point} 

 

I would like to do something like this 

@Range (uniform, gaussian)

attr scatterType = uniform

lot --> 

    scatter(surface, 10, scatterType ) {Point}

 

It may be a small difference, but I was just wondering if it was possible. 

 

kind regards

Kristian

 

 

Outcomes