CityEngine2014.0中的属性连接失败

时间:2018-12-26 09:18:36

标签: arcgis esri city

我发现一个问题,我在CGA规则和形状中使用了相同的属性名称,但是我无法连接该属性。尽管shp源文件位于同一项目中的数据目录中

遵循CGA文件

/**
 * File:    rule.cga
 * Created: 2 Aug 2018 01:10:56 GMT
 * Author:  hp
 */

version "2014.0"

#@Group("floor") @Description("建筑物高度")

attr floor=1 #This attribute is used to generate 3D model and there is the same name of attribute in the shape file


@Group("Settings") @Order(1) @Description("设置显示比例")

attr Scale=1


@Group("Settings") @Rand(0,1) @Order(2) @Description("设置透明度")

attr Opacity=1


@Group("Settings")@Range("whiteToBlack","greenToRed","yellowToRed","redToBlue","orangeToBlue","brownToBlue") @Order(3) @Description("设置填充颜色")

attr ColorRamp= "yellowToRed"


@Group("Settings") @Order(4) @Description("设置颜色范围")

attr ColorRange=1000


Lot-->

   color(colorRamp(ColorRamp,floor/ColorRange))//赋不同的颜色

   set(material.opacity,Opacity)//设置透明度    

   extrude(world.y,floor*Scale/100)//设置拉伸高度

enter image description here enter image description here

0 个答案:

没有答案