Start a new topic

USAGE - TEMPLATES AND REPORTS

Tekla supported discussions about templates and reports. Throw in development ideas and share your knowledge of setting up rules etc.


Thanks

Shorter version:


max(GetValue("SCALE1"),GetValue("SCALE2"),GetValue("SCALE3"),GetValue("SCALE4"),GetValue("SCALE5"))+" U/N"

"1:"+ max(int(mid(GetValue("SCALE1"),2,3)), int(mid(GetValue("SCALE2"),2,3)), int(mid(GetValue("SCALE3"),2,3)), int(mid(GetValue("SCALE4"),2,3)), int(mid(GetValue("SCALE5"),2,3)))

Sometimes, when there is more than one view in the drawing it's complicated to get the right scale to show in the drawing label.

By using this code the largest scale will be always shown:


if int(length(GetValue("SCALE1"))) > int(length(GetValue("SCALE2"))) && int(length(GetValue("SCALE1"))) > int(length(GetValue("SCALE3")))

then GetValue("SCALE1") else

 

if int(length(GetValue("SCALE2"))) > int(length(GetValue("SCALE1"))) && int(length(GetValue("SCALE2"))) > int(length(GetValue("SCALE3")))

then GetValue("SCALE2") else

 

if int(length(GetValue("SCALE3"))) > int(length(GetValue("SCALE1"))) && int(length(GetValue("SCALE3"))) > int(length(GetValue("SCALE2")))

then GetValue("SCALE3") else

 

if int(mid(GetValue("SCALE1"),2,1)) >= int(mid(GetValue("SCALE2"),2,1))

&& int(mid(GetValue("SCALE1"),2,1)) >= int(mid(GetValue("SCALE3"),2,1))

&& int(length(GetValue("SCALE1"))) >= int(length(GetValue("SCALE2")))

&& int(length(GetValue("SCALE1"))) >= int(length(GetValue("SCALE3")))

 

then GetValue("SCALE1") else

 

if int(mid(GetValue("SCALE2"),2,1)) >= int(mid(GetValue("SCALE3"),2,1))

&& int(length(GetValue("SCALE2"))) >= int(length(GetValue("SCALE3")))

 

then GetValue("SCALE2") else

 

GetValue("SCALE3")

 

endif

endif

endif

endif

endif

Login or Signup to post a comment