design_lakeland

X8 Macro Dimension Help

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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!

 

 

post-9014-0-62100700-1469023496_thumb.jpg

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks Joe! I'll give that a whirl tomorrow and let you know how it goes :)

 

Kind Regards,

Mike

Share this post


Link to post
Share on other sites

Thanks Joe, every little bit helps and your macro club is great I use every free macro every month

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Member Statistics

    27478
    Total Members
    6254
    Most Online
    Oilersfan20
    Newest Member
    Oilersfan20
    Joined
  • Similar Content

    • By ccarpenter18
      In X12 I've noticed that when using Structural Member Reporting in a material list, the price column in the list does not appear to be sensitive to whether a "per unit" or "per length" calculation is being performed by the material list.  In both cases, the material list appears to use the same Price variable in the Component Panel of each object.  Does anyone know of some Ruby scripting that could be used to correct this?  Off hand, I'm thinking of a macro inserted into the Price variable on the Component Panel of each structural member that would use the Material List row context to report a price that depends on how the row wants to use the Price.
    • By wjmdes
      Not sure if this was an issue in X11, but in X12, I added "FIELD VERIFY" to Trailing Text under Segments and it also added "FIELD VERIFY" into the extension next to the elevation.  Fortunately, in this case, that is fine, but maybe an issue in the future.

    • By wjmdes
      OK, so today I learned that Legacy is just a fancy term for obsolete.  See, I do know how to search  
       
      I have numerous macros, from others and some I wrote.  Has there been any enhanced documentation regarding what "migrating" is going to do to my macros and what I can expect? Or how to fix issues? Is this going to put the brakes on my workflow?  I know enough to write small macros for menial tasks, but I do not have an extended knowledge.
       
      Or is this just not a big deal?
       
       
    • By Chiefusermickey
      Is there any way to force new objects such as a window, wall, or door to snap to the grid? I have my snap grid/snap unit set to 1". I would like for new items to be placed in the plan on a whole inch and not fractions. As it is I can drop in an object and the dimensions to it will be off the grid and not a whole number. I have to manually move the object to get the dimension to a whole number. I have attached an example of my problem. To many unwanted fractions. 
    • By BuildingVision
      I'm sure this is simple, but I can't figure it out.  I'm new to Chief Architect...
       
      How do I get the callout labels to be smaller, like 1/2 the size they are showing on the image I have attached?  I am referring to the appliance and cabinet callouts.  I can't figure out where those text sizes are controlled. 
       
      I appreciate all the help!