AnsweredAssumed Answered

How can I transfer the yard area to the Sign leaf using the set() command?

Question asked by nazaninyosefi on Apr 26, 2020
Latest reply on Apr 29, 2020 by CLau-esristaff

hello everyone

I want the yard area to appear in the sing leaf. So I used the set(YardArea,geometry.area()) command in the Yard --> set(YardArea,geometry.area()) and then use print command in Sign --> print("Yard For Sing :" YardArea) but the print result for yard area is zero . how can yard area appear correct in the sing leaf. very thanks

 

my code is :

 


@Range(1,30)
attr Height =10
Parcel-->
Sign
split(x) { 6 : Yard |~1:Building }

 


Building -->
extrude(Height)
color(1,0,0)


@Hidden
attr YardArea =0

Yard -->
color(0,0.7,0)
set(YardArea,geometry.area())
print("Yard :"+YardArea)


Sign -->
alignScopeToAxes(y)
t(0,Height+1,scope.sz/1.5)
rotate(rel, scope, 0, 90, 90)
center(y)
s(scope.sx-10,scope.sy,scope.sz-5)
print("Yard For Sing :"+YardArea)

Attachments

Outcomes