X8 Macro Dimension Help


design_lakeland
 Share

Recommended Posts

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

 

 

post-9014-0-66678900-1469018469_thumb.jpg

post-9014-0-27526800-1469018471_thumb.jpg

Link to comment
Share on other sites

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

post-9014-0-10310000-1469021987_thumb.jpg

Link to comment
Share on other sites

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

  • Upvote 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share