BlueEnergy Posted May 1, 2021 Share Posted May 1, 2021 In CA X12 there is a default plan label that shows total Living Area. In this case I have a duplex plan, where must show living space per unit. To illustrate see the attached image. You can't seem to do math with a marco in your own Text object for example: Living Area Per unit: %living.area/2% Total: %living.area% Any ideas? Link to comment Share on other sites More sharing options...
Alaskan_Son Posted May 1, 2021 Share Posted May 1, 2021 Long explanation short: Unlike many other object attributes or name:value pairs, living.area (along with most of Chief's built in "Global" macros) is not something Chief has created a Ruby method for. Text macros (onscreen string substitution) using the %name% approach is a Chief construct . Ruby is something different. It can be used in text macros but it doesn't have to be and commonly isn't. Chief knows what living.area means and replaces it with the appropriate text string but Ruby has no idea what living.area means so in your example above, you're essentially trying to divide nonsense by 2 which results in an error so Chief just doesn't do it. Link to comment Share on other sites More sharing options...
BlueEnergy Posted May 2, 2021 Author Share Posted May 2, 2021 You are right the global macros are limited from a normal text object. I found somewhat of a hack. Inside of the the default LIVING AREA object you can place this line. It does the math on the macro, but does not format and the total size (third line) can't be removed. Per unit: %internal_area/2% sq ft Link to comment Share on other sites More sharing options...
Alaskan_Son Posted May 2, 2021 Share Posted May 2, 2021 28 minutes ago, BlueEnergy said: You are right the global macros are limited from a normal text object. I found somewhat of a hack. Inside of the the default LIVING AREA object you can place this line. It does the math on the macro, but does not format and the total size (third line) can't be removed. Per unit: %internal_area/2% sq ft Nice outside the box thinking! I've used that method in the past myself but I stopped suggesting it because it's just too finnicky. You can just put a filled poly-line (invisible line style) to mask the unwanted portion or add a bunch of carriage returns to push the unwanted text out of view, but that only solves the most minor problem. The real problem is that you'll lose your work anytime the Living Area label gets re-generated. There are a number of operations that will cause it to regenrate, but when it happens, its going to annoy you. Just beware. Link to comment Share on other sites More sharing options...
Chopsaw Posted May 2, 2021 Share Posted May 2, 2021 16 minutes ago, Alaskan_Son said: There are a number of operations that will cause it to regenrate, but when it happens, its going to annoy you. Just beware. Do you recall any one of the particular instances it will regenerate ? It may have been fixed when thy did the last update revision ? I completely deleted the rooms and then rebuilt in a new location and the label was retained. Link to comment Share on other sites More sharing options...
Alaskan_Son Posted May 2, 2021 Share Posted May 2, 2021 1 minute ago, Chopsaw said: Do you recall any one of the particular instances it will regenerate ? There's a reason I didn't list any of the reasons and its because they're all over the board and many are too complicated and seemingly random to describe. Something as simple as building a new floor will do it though. Link to comment Share on other sites More sharing options...
Chopsaw Posted May 2, 2021 Share Posted May 2, 2021 2 minutes ago, Alaskan_Son said: Something as simple as building a new floor will do it though. Yup that is a deal breaker right there unless it is something that could be done at the end of the build just before printing ? Link to comment Share on other sites More sharing options...
Alaskan_Son Posted November 18, 2021 Share Posted November 18, 2021 Update: I recently developed a method in X13 that actually does allow accessing and parsing the data from most of Chief's Global Macros... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now