How can I RoundUp the rectangle to the nearest whole number? So when a rectangle that is an odd size i.e. 40.1"w x 12.135"h, it'll Round to 41 & 13.
________________________________
dLeeway = 0.5sr.Add ActiveLayer.CreateRectangle2(x - dLeeway, y - dLeeway, w + dLeeway * 2, h + dLeeway * 2)
Usually if you want to round up from x.5 you add 0.5 to the dimension. In this case add 0.999 to the dimension
dLeeway = 0.5
FinalWidth = int(w + dLeeway * 2 + 0.999)
FinalHeight = int(h + dLeeway * 2 + 0.999)sr.Add ActiveLayer.CreateRectangle2(x - dLeeway, y - dLeeway, FinalWidth, FinalHeight)
Rounds good but now the x & y are off.