-
Posts
11855 -
Joined
-
Last visited
Content Type
Profiles
Forums
Gallery
Everything posted by Joe_Carrick
-
Avoiding Evaluation Errors Sometimes we need to check the output of a macro while in edit mode but the object selected is one that doesn't have a Label so our context will need to be "Referenced". However, if we have selected a "Close Polyline" then while we are in the Text Macro Management dialog the context will in fact be "Owner". In order to make our macro work without an error we need to use a "Block of Code" to handle the error smoothly. Here's an example: begin result = owner.area rescue result = referenced.area end result = "Area = " + result.round(0).to_s + " Sq.Ft." return result This code will work with either context.
-
Ruby Console Chief provides a Ruby Console which allows you to inspect what attributes are available for an object and also check the values of those attributes. There is a basic tutorial on using the Ruby Console which should be reviewed. You can do this by opening the Ruby Console and typing tutorial. Here are some basics: When you have an object selected in Chief and then in the Ruby Console type owner.names.sort you will see a list of all the attributes available for that object. Let's say that you have a room selected: Some of the attributes will be name, standard_area, internal_area, type_name You can then type owner.standard_area and Ruby will display that data. Note that Ruby is case sensitive. Ruby recognizes data as String, Integer, Floating Point, Logical, Array or Hash. Here are some basic methods that can be used to modify the data: .to_i converts string or floating point value to an integer .to_f converts string or integer value to a floating point .to_s converts an integer or floating point value to a string .round(n) rounds a floating point value to n places .gsub(str1,str2) substitutes str2 for str1 in a string To use a method you simply add the method after the data. For example if the room is 247.68342 sq.ft. owner.standard_area.round(0).to_s will return a string with no decimal places displayed. ie: 248 owner.standard_area.round(0).to_s + "Sq.Ft." will return 248 Sq.Ft. So far it's just the Ruby Console. Anything you do there is not going to effect anything displayed in your Plan - but it is a good place to experiment with the modifiers and any calculations that you want to impose to get a result. Text Macro Management - New To create a macro so we can access and display data requires that the macro knows it's "Context". There are 3 possibilities: None ........... The data is independent of any Chief Object (It's just text or numerical data typed in the macro). Owner ......... The attribute is from a Chief Object via it's Label (the macro has to b included in the Default Label Referenced . The attribute is from a Chief Object (usually CAD) that is connect to a Text Box by an Arrow. So, using the example above we can add to the Room Label by having an "Owner Context" macro named Room Standard Area which consists of "Standard Area = " + owner.standard_area.round(0).to_s + "Sq.Ft.". In the Default Room Label we would then add %Room Standard Area% and Standard Area = 248 Sq.Ft. would be added to the Room Label. Actually the number would be different for each room but the data would be displayed in all Room Labels. For objects like Closed Polylines we have to use a Text Box with an arrowhead connected to the Polyline. In that case our macro would be: "Area = " + referenced.area.round(0).to_s + "Sq.Ft." By using a Text Box, we can get a note with multiple lines and if it's a Rich Text Box we can get additional formatting. The return value of any macro is the last line of the macro. So if you want to use a macro to perform a calculation and store it in a global variable ($MyVariable) but display nothing you just add 2 single quote marks as the last line. This can be very handy for use in Default Labels, allowing a calculation to be made and the data store where we can use it later without changing the displayed Labels. There are a lot of additional things that can be done, but I hope the above provides a little better understanding.
-
Scott, My system doesn't require any arrows to disseminate different floor areas. I am not using Polylines with arrows pointing to them so there isn't any confusion. Using my system the areas are automatically summed and available to use for calculations and display of the data as needed. The only caveat is that you must use room types and unique names for each room that's to be included. I do this simply by giving each room a number. Rooms on the 1st Floor are the 100's, 2nd Floor the 200's, 3rd Floor the 300's, etc. For the "Basement" I use "001", "002", etc. Using just a single Ruby Macro my system: 1. Gets and stores the following attributes for each room: name, type_name, standard_area, internal_area, floor #, included_in_living_area (T/F) 2. It sums the areas of all: Balconies, Courts, Decks, Garages, Porches, Bedrooms & the Master Suite 3. It gets the Living Area of each Floor, Sums them and also stores the total area of each floor (including Garage Areas) which provides the "Lot Coverage" Using another Ruby Macro - this time with Arrows my system identifies and stores the following: Property Area SetBack (Buildable) Area Road Area Totals Driveway Area Totals Terrain Path Area Totals There are a series of "Display" macros that can be used to put together a Rich Text Box formatted as needed. If there are special sub-totals or totals needed for any specific set of rooms (there needs to be a unique common word in the room names) I can easily provide a macro to provide those sub-totals or totals as well. I have not found a single case where the data was inaccurate in any way and I do not get any "evaluation errors". All of the data is live and only requires that each Floor and the Site Plan be displayed for any changed to be reflected in the displayed results. Due to the complexity of doing the above I do not expect that CA will provide for it at any time in the foreseeable future. It has taken me a lot of time to put it together and I don't see CA putting this on a priority list.
-
Gerry, I would not presume that I could copyright a concept that anyone else demonstrated. However, having put together a specific way of obtaining and using the information in a Chief Plan and writing detailed macros and subroutines - I have every right to copyright that specific implementation. I have asked you from time to time about how to do something using Ruby. You have been most generous in assisting me in that manner and I truly appreciate that. You have provided code snippets and other information that has helped me a great deal. What I've alluded to is naturally general in its description but the implementation is very specific - and innovative. It is not the same - or even close - to anything that I've seen demonstrated and I believe is quite different from other solutions that have been described. I have in the past and will in the future continue to provide content to the users of these forums. Most of the time the effort required to do so takes very little time but sometimes it is a much larger project and when that's the case I believe I have the right to be compensated and to protect myself from anyone improperly giving my work product to anyone else. "chosen"? Please..... that's a cheap shot and you know it. I, along with several others, volunteered to assist and provide feedback on some things that CA is doing. None of us consider ourselves "special" for having been accepted for this job. It's an honor and IMO a duty to do what we can to make Chief better for everyone.
-
I would like to clear up a few things about these items. 1. Room Labels generally are limited to the macros the Chief provides but they can use Ruby "Owner" macros if the macro is included in the "Default Room Label" 2. It is possible to use a Ruby Macro within the Default Room Label to accumulate the areas of all the rooms in the Plan as well as the individual Floor Living Areas. It is also possible to accumulate the areas of Decks, Balconiess, Courts, Porches, Garages, Bedrooms, etc. 3. Rich Text Boxes can be used as Room Labels to customize the way they appear. The text in such a "Label" can be formatted, have additional text added and have a border and fill as desired. If the center of such a Text Box is within or in contact with the room perimeter it will execute the Chief Room Macros. Otherwise, an arrow can be added and when the arrowhead is within or in contact with the room perimeter it will also work. 4. I have been working on a comprehensive system of Ruby macros and Rich Text boxes using Ruby Global Variables to fill in Project Data including Site Area Analysis. This is almost completed and I am able to sum various room types based on both the type and/or the name of the rooms. One example is to total all the room areas within a Master Suite. There is very little that can not be done using my system. 5. X7 has improved the bond between a polyline and a Text Box Arrowhead so that Site Area Macros are much more reliable. By using the properties available for various Site objects it is not only possible but I have put together a macro that recognizes the object for what it is and stores it's area for use in Site Analysis. 6. The output of a Ruby Macro can be formatted into rows and columns and can be word-wrapped as desired. 7. Ruby can read and write to external text files so Project Data that Chief doesn't currently provide for such as consultants, etc can be automatically placed where needed in a set of ConDocs. Some of the above is not trivial and I would not recommend anyone without programming experience attempt it on their own. I will be making my system available for a fee to those interested - copyrighted of course and only for single use. I can if needed make some customized macros for displaying the data in ways that might be slightly different than my own. IAE, Don't be discouraged by those who say it can't be done or that it's not worth the trouble. There are many ways to retrieve data and utilize it with Ruby macros and there is more available within Chief's attributes than is apparent at first glance. More would be nice of course - but we are not handcuffed.
-
Alan, What is the "Context" of your macro? It should be "Referenced" since you are using an arrow to connect to the object.
-
Larry, It can be done - but not exactly that way. It would be a new macro that looks something like this: result = owner.standard_area/50 You would name this macro occupant_15 Then in the Room Label (or a Text Box placed in the room) you would add %occupant_15% But I would be more inclined to do it this way: result = (owner.standard_area/15).to_i Then add to the Room Label (or a Text Box placed in the room): Maximum Occupant Load = %occupant_15% so the resulting display would be: Maximum Occupant Load = 50
-
Most likely the "Exterior Room" was painted with siding.
-
Export the macros and then open your Default Template Plan. Import those macros and save the template Plan. Now you have them in all your new Plans using that Template.
-
A better test would be a Ray Trace.
-
I just always design so that there are about 3-6 inches for setback. It's inevitable that the construction will be off a bit and who needs the hassle.
-
See post #17 In X7 the Standard Area of a Garage is calculated to the center of surrounding walls. For other Room Types the Standard Area is calculated to the outside of Exterior Walls and the center of shared walls. The Interior Area is calculated to the inside face of the walls. Living Area (Inside Exterior Room) is calculated to the Exterior Framing Layer of everything except Garages, Decks, Porches & Courts - unless you specify any of those as "Include in Living Area. I have been doing some extensive work using some Ruby macros to put all of this together so I can automatically add all of this notation to my Plan Data in my Layouts. It is all accurate - I've checked Chief's values with close Polylines and have absolute faith in the values Chief reports.
-
I just did some checking and found the following: %standard_area% reports the area to the center_line of the enclosing walls. %internal_area% reports the area to the interior face of the walls. Using the default labels (Rooms, Standard Area & Rooms, Internal Area) both are rounded to the nearest sq.ft. Using the Ruby attributes they are accurate to 14 decimal places. I'm not sure what you want or need to show. My preference is a Custom Room Label using a Rich Text Box where I can specifically note what the area indicates.
-
Alex, I did a Library of Shaker Doors. I think it's in the old Forum.
-
Alan, Get a set of Headphones with mic. Plantronics has some nice ones and they really are not that expensive.
-
Changing Wall Heights From 9' To 10' On Finished Plan
Joe_Carrick replied to BAGrant's topic in General Q & A
Note, There's a faster way. Go into the Plan Defaults and make the changes there. You'll have to do it for each floor. Then, dbl click on each room and in the Structure Tab click on the "Use Default" for the Ceiling Height. Do that for each Room - but start on the Top Floor and work down. Then Rebuild the Roof Planes. -
So why use a "Slab Room Type" instead of just a "Slab"? Basically because you can "Label" the Room and it's relative to the Floor Level instead of "Absolute Elevation". It can also have a "Floor Finish" instead of being just a single material.
-
Jay Jay, Can you explain this statement? In what way is the model incorrect if the the basement is on Level 1 and the floors above are on Levels 2,3,etc.?
-
Joey, The reason we put basements on Level 1 is that the are almost always "Walk-Out" here and inevitably have some walls that are full height studs, some with a combination of Stem Walls and Stud Walls, and sometimes full height Stem Walls. Beneath all of that is a concrete "Foundation" and Slab. It's much easier to separate the "Living Space" from the "Foundation" by using Level 1 for the Basement. Often, the Basement is only a portion of the 1st Floor area, so we have Foundation that extends beyond the area of the Basement itself and forms a Crawl Space beneath the rest of the house. In reality, it would be nice if Chief would add additional Levels below Level 1 and the Foundation. They already have an "Attic Level" between the Top Floor and the Roof. Basement Levels between the Foundation and the First Floor would make it much easier to identify and Label the various Plans.
-
Hi Michael, That's correct. I think that particular one was either Western Digital or something masquerading as such. IAE, it was reported as being very big and using a lot of cpu. Some Anti-Virus software can also cause problems by scanning too much.
-
Michael, Obviously your Laptop is more capable - but not to the extent that you should be seeing that kind of lag in 2D. It sounds like some Process or Service is taking big time slices. I had a WDMFC service that somehow got started on an older Windows7 system and was just bringing the machine to a crawl. I stopped that service and bingo. Then I found that every time I restarted the system, that service would be there again. If you can't find the problem - take it to a tech and have them run some diagnostics.
-
Jon, Not to my knowledge. %page.print% will give you the number of page, but I don't think there's any way to make the schedule do that.
-
No, the OOB setting has the drywall in the "Ceiling Finish". IMO that's just a left over inconsistency from long ago. Remember that we didn't always have the "Room Material List".
-
Dennis, I don't think there's an inconsistency here at all. I think the "Ceiling Drywall" is an effect of having Drywall as a part of the "Ceiling Finish". With Walls it's part of the "Wall Type" so for Ceilings it should probably be included in the "Ceiling Structure". I have it set up that way in my Defaults so a Room Materials List doesn't include any drywall at all.
-
Joey, Your Material List is for the entire structure. Try it with just a "Room Material List".