Overflow script error

Problem: Overflow script error 


Receiving a script error when calculating waste %: Overflow 



The value mapping issue is caused by the waste % calculation trying to divide by 0 because there is not a closed perimeter.  This can be fixed by replacing or editing the existing waste % mapping in the value mapping referenced above, with the changes/additions in red: 


' Waste % 

Set enquire = ActiveLayer.EnquireArea 


enquire.Mode = eamOneUps 


If enquire.OutsideArea = 0 then 

   'Cannot divide by 0 

   Result = 0 


   Result = Round(((enquire.InsideArea/enquire.OutsideArea) * 100),4) 

End If 

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

You may like to read -