Macro Problems


SkyJubilee
 Share

Go to solution Solved by Renerabbitt,

Recommended Posts

Hello,

1) Please advise on where to find the library on CA Ruby parameters & methods. For example, how is num_foundation_bolts calculated?  I lost several hours trying to figure out how to call Custom Object Fields, only to discover that it was custom_fields["Custom Name"] from a screenshot in an old forum post. Where is that officially documented?

 

2) I created a User-Defined Macro named "paramsRebar". Please refer to attached screenshot for its parameters.  I set it up to store all required parameters of rebar in order to have a single place to update settings.
I used Custom Object Fields to return the required parameter as an integer.
When I call "=custom_fields["SlabWithFooting.NumBarRuns"]" within Label or Comment, it returns 2 as expected, but when I call the same value within Count, Extra, Price, Markup%, Labor, or Equipment, it returns Evaluation Error.
Also, "=macros.paramsRebar("runs")" and "=macros.paramsRebar("runs").to_i" return Evaluation Error within all fields, including Comment & Label.

Please advise on how to fix this.

 

Thanks!

Screenshot 2024-05-29 184803.png

Screenshot 2024-05-29 184953.png

Screenshot 2024-05-29 185153.png

Link to comment
Share on other sites

Thank you for responding promptly (Do you go by Rene, Mr. Rabbit, or something else?). I've spent the last few days taking it all in. My main goal is to setup my templates to calculate true material list ready for uploading to BuilderTrend for ordering materials and eliminate the take-off step. Based on the Forum histories, I understand it's a bit of a tall mountain to move. The first step to achieving this is to store values globally for calling up later, which I was attempting to do by calling a Macro that was expecting a parameter. It worked for the label when pulled from a custom object field, but not anywhere else. I posted my question before reading Chapter 43 of the manual that you pointed me to, and now I have figured out a better way.

I started with creating an Array Macro. This provides me a single place to update the values of the material we use (the name starts with an underscore to keep it at the top because in the future it should be the only one I need to edit):

image.thumb.png.361cc500e58efbb96e6465adad747005.png

 

I then created individual Ruby Macros (evaluated) to call the needed values in other areas:

image.thumb.png.ce05a7d3f88e7cd6470e32f46a746a21.png

 

And I made the desired Text Macro (non-evaluated) to provide the label (I actually split it into 2 text macros, as you may notice later):

image.thumb.png.761fba348e8e018c48af7bb3aed335db.png

 

I created Custom Object Fields to import the text Macros (based on forum complaints of COF names showing up in all places, I started the names with an object identifier):

image.thumb.png.896c8f55fa5b0f3153b3ae3fc7fca412.png

 

I needed the COF because it was the only way I could figure out how to get a non-evaluated macro to show up in the Component Label field:

image.thumb.png.a48c9a66bdc1179b21b8a726eef1a5fe.png

 

I updated the Count to "=((steel_mesh_area)/macros.valWireMeshUsableArea).ceil" and results are what I want:

image.thumb.png.a14b2c2c75509cccf479f0fc9d3761d2.png

 

One component down, a couple hundred to go!  I hope this walk-through can help others.

Link to comment
Share on other sites

1 hour ago, SkyJubilee said:

Thank you for responding promptly (Do you go by Rene, Mr. Rabbit, or something else?). I've spent the last few days taking it all in. My main goal is to setup my templates to calculate true material list ready for uploading to BuilderTrend for ordering materials and eliminate the take-off step. Based on the Forum histories, I understand it's a bit of a tall mountain to \

You can find several posts where I point out that we simply do not need a complete model(mesh) to create construction documents. it takes me roughly 30% additional hours creating a model I could do a takeoff from..simply not worth the time. Check the math on your end, a good framer will do takeoffs in 2-3 hours and cost a few hundred bucks, vs the several extra days of work it will take to do an accurate takeoff. I could name a hundred other users that would tell you the same, and even one recently that went for it anyway and just came back a year later and said the same thing. Please put your efforts into something else I beg!
 

Link to comment
Share on other sites

Rene or Rabbitt is fine
So I read through the rest of the post. A couple of things to keep in mind. A room defined by room dividers set to a room type that has a mono slab may be a much better approach. Style Palettes can be created from a room type and a style palette can offer a single click spray for applying or swapping your custom fields. A style palette can only swap all custom fields, so its never a bad idea to utilize code/comment etc. as these can be swapped independently or in groups using style palettes,  especially because they can be renamed in schedule as well as material fields and can also automatically report to a material list.
Another benefit of this approach is that materials can generate their own designation of length and width of roll without you needing to manuall adjust a macro. see screenshot:
image.thumb.png.127a1655ed39d9bd820725b3e9b6075c.png
Which means you could add a layer to your floor assembly in order to achieve this, thus further automating since you could make multiple mesh materials for a quick spray and swap.
You could of course drop a text box in a CAD detail with globals for setting the values easily and then drop a callout linked to that cad detail on your drawing sheet for quick access to all of your global parameters so that its easier for your end user.
Also keep in mind you can make a custom unit of measurement in preferences.
All this to say you could have custom placed library objects linked to various style palette single click sprayers to adjust yoru settings with one click as well as other custom materials to adjust the reporting material also linked to custom placed library objects on your toolbar for single click actions.
have fun :)

 

Link to comment
Share on other sites

Hey Rene, we are trying to get the most out of Builder Trend to improve our productivity. 95% of the houses we build are based on existing plans (often with minor tweaks for customer preferences, as well different hardware for different code compliance), which is why we hope that initial setup will pay off in the long run for improved accuracy & time reduction, and therefore savings. We procured CA because it was the best design software that interfaced with BT. We brought Sky onboard as our in-house draftsman to help us set up the template houses and create accurate material lists. We're not concerned about 3D rendering things like stud plates, we just want to make sure the right count shows up on the material list for export by using the same math our framers and take-off specialist have been using, which is why we were using the components of template items that she already uses for making the initial plans. 

Thank you for the additional tips! I'll work with Sky next week to make sure we have an understanding of what you have presented.

 

Thanks & God Bless,

Phil

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