More Macro Help


jbaehmer
 Share

Recommended Posts

I have a couple questions for those "Macro" experts out there.  I am trying to get CA to auto calc some numbers for me.  I have attached a plan with the questions.

 

First is trying to get the "total roof area" into a macro so when I draw a roof, the macro will automatically calc out the sqft.  As of now, I have to get the number and manually enter it in.  I would rather not do that and have CA do it automatically.

 

Second is getting a macro to do a basic math equation.  One number is from a polyline and the other is manually entered.  

 

Any help is appreciated!

Macro Questions.plan

Link to comment
Share on other sites

The Total Roof Area is more work than it's worth.  You would need to have a reference macro with an arrow pointing to each roof plane.  It could pick up and store that area in a global variable but to calculate the total it would have to then add each one up and store it in another variable to display.  Each time chief redisplays the plan, each of these macros would be evaluated and since roof planes do not have unique id's like room names it's almost impossible to make sure each value is zeroed out and the total is calculated properly. 

 

I've done a similar thing with decks, bedrooms, etc but with roof planes it would be almost impossible the way is currently configured.

 

The only values from a Polyline that might be useable would be perimeter and area.  Writing a macro to access those would be possible but it would need to be a reference macro and I'm not sure Chief has included the capability of entering user values in Ruby. 

Link to comment
Share on other sites

I pretty much agree with Joe. It's really not a good (productive) idea to try to extend Chief into areas that Chief has "Signaled" that their not likely to support. You'll only run into road block after road block.

 

However, Joe is on the right track, To do this you need to use global memory as temporary storage. In addition, you need to assign a ID to each object through the reference macro. The result then is quite easy to accomplish.

 

Since you must use a reference macro for each plane, this is easy to do. BUT 10 roof planes == ten unique macros, although they will be identical except for the ID in each one.

 

Overall , you'll find the set up will take longer than just manual cals.

 

If your still interested, I'll try to find and attach an example late tonight as I have done this before ( unless someone beats me to it).

 

BTW, references are not really reliable in Chief for reasons Chief is well aware but not likely to change..

Link to comment
Share on other sites

Thanks.  Yeah...I am definitely not going to do a macro for each roof plane.  That is just way too time consuming that just looking up the "All Roof Planes" is much faster.  I was hoping since it appears that CA (assuming in the background somewhere) figures out the total for all roof planes, that there was a simple way to get that value.

 

I do currently use macros for house/garage/porch square footages that seems to work fairly well for me using the same concept.  I do not feel how CA determines SqFt totals are correct, so the polylines are my little "work-around".  

 

For the second part of the question - is there a way to do a mathematical equation within a macro.  I want to take an "area" of a polyline and subtract a value that I enter in.  What it is for is glazing percentages.  The "area" is the house sqft and the value I enter is the glazing sqft.  I was hoping it was a quick easy thing that it could calc out.  If not, it isn't the end of the world.  Saving a step adds up over time, so just looking for ways to speed up my process.

 

Thanks for the info guys!  Appreciate it!

Link to comment
Share on other sites

You can also use the supplied "Living Area" text box as ruby has access to the same room values as a normal room except this is for the whole house area.

 

Just make up a one line macro using either standard_area or internal_ area with the equation = glazing area/standard_area. (your number in glazing area) however these fields do exclude  any excluded room areas from living area. Ruby macros always report the last value calculated.

 

Then add the macro to one line of the "living area" text box.

Link to comment
Share on other sites

No.  I use a polyline and on a separate layer set specific for that purpose cover the area of the house.  The issue I have with CA sqft calc is that they take the house walls that have a porch cover/deck/garage/etc and split that wall in half.  I do not feel that is correct.  I am sure they have a reason programming-wise as to why it is that way, so that is my "work-around".  It would be nice if that was changed, but I don't think that will happen anytime soon.

Link to comment
Share on other sites

No.  I use a polyline and on a separate layer set specific for that purpose cover the area of the house.  The issue I have with CA sqft calc is that they take the house walls that have a porch cover/deck/garage/etc and split that wall in half.  I do not feel that is correct.  I am sure they have a reason programming-wise as to why it is that way, so that is my "work-around".  It would be nice if that was changed, but I don't think that will happen anytime soon.

 

Jared

Yes, that is incorrect, to figure 1/2 walls on porches and garages, but its close enough for me, until fixed, whenever they get around to it. (a few s.f.) . I just use the room finish schedule to figure square footage w/ totals included. You can also include or not any room.

post-113-0-27140100-1398528563_thumb.png

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