Recommended Posts

I'm inexperienced with macros and such, so any help is welcomed. 

I've wanted a way for the daylight/vent to be incorporated, but I'd be happy with just some math to be done in a text box. I'm sure some of you have seen my requests. ;)

 

Could someone help me get this done? I got an email a long time ago from someone but don't know what I did with it, or if I understood it anyway. It's probably uber-easy...

 

TOTAL SF - %room.area.internal%

DLO REQ'D - %room.area.internal% (times) .08

VENT REQ'D - %room.area.internal% (times) .04

 

I can just copy this text into a room and VIOLA! I get my answers. That's my dreeeeaaaaam.

Share this post


Link to post
Share on other sites

We already have the square footage macro and the window area macro, we just need the total and calculate macro.

Share this post


Link to post
Share on other sites

Unfortunately Chief doesn't currently allow us to access/manipulate the values of their predefined macros so your only solution will probably be to create a custom macro using TMM (Text Macro Management) which is a little easier said than done if you're not familiar with it.

This particular macro shouldn't be too complex and if I wasn't so busy I might just donate the time but I'm pretty swamped right now so if you'd like me to write one for you I could probably do so for a small fee. Just send me a PM if you are interested. Maybe someone else will be willing to donate their time though… I guess we'll see. You might also check with Joe Carrick, he might already have a macro that works for you as part of his macro a month club or as a standalone macro package that he has for sale.

Share this post


Link to post
Share on other sites

While we are on the subject…

This particular macro would require using multiplication. I can't seem to get the "*" operator to work in a custom macro so I've ended up using "/" and the inverse of the desired number. What am I missing? I thought "*" was Ruby's multiplication operator but apparently not.

Share this post


Link to post
Share on other sites

How are you using it? asm.jpg

Try doing the same thing to modify an object attribute and see what you get.

Share this post


Link to post
Share on other sites

Hmm...very strange. I'm going to test again when I get back to the office but for some reason I couldn't get it to work. Can you do me a favor in the meantime and try testing with less than a whole number? Use the example in the OP maybe (.8). I wonder if perhaps my problem is that you need to start with a zero (0.8)?

Share this post


Link to post
Share on other sites

I wonder if perhaps my problem is that you need to start with a zero (0.8)?

 

That's it -- that's Ruby ...

Share this post


Link to post
Share on other sites

Create a new macro with the following -- I named it "dv". Check Evaluate and set Context to Owner Object.

 

'TOTAL SF - ' + internal_area.to_s + "\n" + 'DLO REQ\'D - ' + (internal_area.to_f * 0.08).to_s + "\n" + 'VENT REQ\'D - ' + (internal_area.to_f * 0.04).to_s

 

Add it to the default room label.

 

post-1284-0-30645600-1468979948_thumb.jpg

 

Test it to see if it works.

Share this post


Link to post
Share on other sites

Thanks, Eric. I was getting a couple of rooms that ran out the decimal pretty far so I added 

 

'TOTAL SF - ' + internal_area.to_s + "\n" + 'DLO REQ\'D - ' + (internal_area.to_f * 0.08).round(2).to_s + " sf"+ "\n" + 'VENT REQ\'D - ' + (internal_area.to_f * 0.04).round(2).to_s + " sf"

 

Because it has to "live" in the Room Label, I'll just modify the way I label the rooms. This will at least save me from having to do that part manually! Thanks again!

 

Screenshot 2016 07 20 08.06.02

 

Irrelevant, but I did use to use lisp in AutoCAD a lot, wrote/modified a ton of php, dabbled in mysql, but Ruby defies me. Not to mention my job here keeps me drawing instead of doing "fun" stuff! I'd love to be able to modify CA more than I can!

Share this post


Link to post
Share on other sites

What about when you add a room and you need to steal light and ventilation from the new room to show a combined 2 rooms calc. Any chance of that? Happens to me all the time. the only thing I could think might work is a no -room def between the 2 rooms, but in most cases I need the room def.

Share this post


Link to post
Share on other sites

What about when you add a room and you need to steal light and ventilation from the new room to show a combined 2 rooms calc. Any chance of that? Happens to me all the time. the only thing I could think might work is a no -room def between the 2 rooms, but in most cases I need the room def.

 

Would you still want the labels in the individual rooms or just the one label with combined totals?  It can definitely be done and although I'm sure Joe, Eric, or someone else might be able to come up with something more elegant but the only way I know of doing it would require a "one time use" macro for each of the 2 rooms and possibly a 3rd depending on how you wanted things displayed. 

 

And by "one time use" I mean just that...The macros could only be used once in any given plan.  If you had the situation arise multiple times in the same plan you would have to set up 2 or 3 more similar macros with some very minor changes. Easy enough to do but keeping track might be a different story.  

Share this post


Link to post
Share on other sites

What about when you add a room and you need to steal light and ventilation from the new room to show a combined 2 rooms calc. Any chance of that? Happens to me all the time. the only thing I could think might work is a no -room def between the 2 rooms, but in most cases I need the room def.

Could you use a polyline, shaped to include a specific area?

post-1284-0-51608800-1469118333_thumb.jpgpost-1284-0-65644700-1469118981_thumb.jpg

Share this post


Link to post
Share on other sites

Could you use a polyline, shaped to include a specific area?

p1.jpg p2.jpg

That's a good idea Eric. The one downside to that method would be that you would have to remember to resize the polyline anytime you modified the room size(s).

Share this post


Link to post
Share on other sites

That's a good idea Eric. The one downside to that method would be that you would have to remember to resize the polyline anytime you modified the room size(s).

So just wait until you have the rooms finalized.  Some things are never going to be 100% automatic. 

 

OTOH, I prefer a methodology that is more comprehensive.  If all rooms have unique names, a global hash table can be maintained and a single macro can be used to sum the areas of any one (or more) rooms.  This only requires two macros:

 

1.  A macro In the Default Room Label to accumulate and maintain the hash table. 

   a.  The hash table would contain at a minimum the internal_area of each room.

   b.  It could if desired also contain the required vent and opening areas

2.  Another macro to display the desired output based on summing the values in the hash table for

specific rooms.

   a.  This macro could be used in the Default Room Label for single rooms but could be easily modified to use for multiple rooms.

Share this post


Link to post
Share on other sites

So just wait until you have the rooms finalized. Some things are never going to be 100% automatic.

Totally agree.

Share this post


Link to post
Share on other sites

Could you use a polyline, shaped to include a specific area?

attachicon.gifp1.jpgattachicon.gifp2.jpg

Nice suggestion guys ,forgot about that one Eric, thanks

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

    27469
    Total Members
    6254
    Most Online
    THDesign
    Newest Member
    THDesign
    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
      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 mdarch47
      I apologize because I know this topic has been covered many times but I can't seem to find exactly the help I need from previous posts.
       
      I have created a simple room information label but wanted to modify it slightly.  See attached.  Want ceiling height to read in feet and inches and want to round the room volume to nearest whole number.
       
      A related matter is when I go in the text box and try to insert a user defined macro they are all grayed out. I was attempting to copy and modify the volume macro to round out, but could not insert the modified version.... Not sure why that is.
       
      If someone can point me in the right direction and or provide any assistance, that is greatly appreciated.
       
      Thank you,  Mike Dolce, Architect
      Chief V-X10
      Morrow-EC_-_Copy.plan
      Morrow-Sample-Plan.pdf
    • By BrownTiger
      The Andersen 100 Series windows [Fiberex] are always popular with a builders. Primarily, they offer different interior and exterior colors, not as ugly as some other Vinyl... Sometimes designer want to know if he is using standard vs custom sizes [adds +$$].
       
      So here is a validator macro, that can be assigned as a label or just executed in the tmm
       

       
      Free Macro, enjoy
      Code demonstrate use of Ruby arrays, and "any?" method.
       
      BT
      I also have A200,400, and pella.. But this will get you started if you are not 100% familiar with Ruby.
      Andersen100Units.json
    • By rcmcdougle
      I do renovation work frequently. As part of my process I load a PDF of the existing plan then trace over it. I would love to have a button on my main toolbar that would toggle that one layers visibility. It is a pain to click through the layer dialog many times a day for this.  Any thoughts?