
If it is easier to test for the opposite, then do that to reduce and optimize your code. If it returns the value -1 it means the value is not in the list.Īlso the example based on your text file contains about 70 values for a range of values that seems to be between 0 and 100. Return i != - 1 Ĭonsider the array "arr" as the list of values you want to test the attribute "ServiceTypecd" against. The IndexOf function will return the location of the value you search for in the list. '74', '75', '76', '77', '78', '79', '80', '81' , We will use CityEngine and Python scripting within Grasshopper for generative potentials in studio, and Q-GIS /ArcGIS/ D3 to interrogate sets of maps and. So we’ll create a lower resolution JPG of our area of interest.

CityEngine doesn’t work well with large rasters. Get an aerial image for your Area of Interest. This will convert the heights from feet to meters. To provide an example of what you can do to avoid endless or statements, see the expression below: var test = "7"

I noticed you attached two text files with some invalid Arcade expressions. You can also consider doing something like this: var case = $feature. Is there an easier way to write out this scenario? I've seen the below solution in another article, but that would take a while to write out every possible scenario By using split.index (which equals the floor index in this context), it's ensured that office floors are generated up to the desired floor index, controlled by the mixedOffice attribute. I'd like to be able to group the combinations into Homes and Passings. A special expression is used to differentiate between office and residential usage in the case of mixed land-use type. I can use the concatenate function and that works, but that leaves me with dozens of combinations, so I'd rather not have to manually go into the symbology editor and adjust them one by one.
#CITYENGINE EXPRESSION HOW TO#
So far, I haven't been able to figure out how to write the expression for these scenarios. For Passings, we need inactive accounts, certain service ID's, and certain rate schedules.

For Homes, we need active accounts, certain service ID's, and certain rate schedules. There are 'Homes' and there are 'Passings'. I've attached two text documents in vb script format that detail what exactly needs to fall under which category. Using a procedural modelling approach, it supports the creation of detailed large-scale 3D city models.
#CITYENGINE EXPRESSION SOFTWARE#
The problem I can't overcome at the moment is that the symbology needs to be based on 3 different fields. CityEngine is a commercial three-dimensional modelling software application developed by Esri R&D Center Zurich and specializes in the generation of 3D urban environments. I am trying to write an Arcade expression for symbology I need in a web map in Portal.
