design_lakeland Posted July 20, 2016 Share Posted July 20, 2016 Hi all, Updated to X8 yesterday Some of my labels have started putting seven decimal places on the required dimensions I don't want this and understand that I need to edit my label macros to enable this? Can someone point me in the right direction. Please see attached images for examples of my problem. If you will notice the window dimension which has used the exact same 'object specific' macros as the radiator below it, however the displayed dimensions have completely different decimal place tolerances. Im am completely useless at Ruby but will happily give it a go if thats what needs to be done. Thanks all, Kind Regards, Mike Link to comment Share on other sites More sharing options...
Joe_Carrick Posted July 20, 2016 Share Posted July 20, 2016 To control the number of decimal places you will need to use Ruby. Chief's built in macros can't be rounded. There are examples of how to do this in another thread. https://chieftalk.chiefarchitect.com/index.php?/topic/9401-polyline-labels/?hl=round#entry82412 1 Link to comment Share on other sites More sharing options...
design_lakeland Posted July 20, 2016 Author Share Posted July 20, 2016 Hi Joe, Thanks for the rapid reply I've got as far as the image attached. I can't seem to be able to display the height AND the width. I've managed to add them together but thats completely useless to me ha..... what would be the script in ruby that would allow me to write is as: '600 x 800' When I do it as 'height.round(0) x width.round(0)' it comes up with evaluation error...... so that obviously not it, I've tried quotation marks, brackets, question marks and various other ways Like I said, I'm completely useless at Ruby Thanks, Mike Link to comment Share on other sites More sharing options...
design_lakeland Posted July 20, 2016 Author Share Posted July 20, 2016 I've just ended up putting individual rounded macros into the label and separating them via the specify label text box. That'll do me! I shining Ruby I most certainly am not! Link to comment Share on other sites More sharing options...
Joe_Carrick Posted July 20, 2016 Share Posted July 20, 2016 In Ruby, you can add numbers and you can concatenate strings using "+" but you can't mix them. To get the output you've indicated you have to use the .to_s method to convert the numerical values to strings as follows: height.round(0).to_s + " x " + width.round(0).to_s 1 Link to comment Share on other sites More sharing options...
design_lakeland Posted July 20, 2016 Author Share Posted July 20, 2016 Thanks Joe! I'll give that a whirl tomorrow and let you know how it goes Kind Regards, Mike Link to comment Share on other sites More sharing options...
DRAWZILLA Posted July 20, 2016 Share Posted July 20, 2016 Thanks Joe, every little bit helps and your macro club is great I use every free macro every month Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now