Automatic Living Area Label


ARBDESIGN
 Share

Recommended Posts

Hi. The automatic living area label calculates the living area. When I do automatic dimensions the living area label lays over the top of the dimensions. I drag it to a new position and it always keeps converting back to original position. How can I move it and keep it in its new position permantley?

Link to comment
Share on other sites

Perry:

 

yep, retired

 

also annoyed at the lame implementation of Ruby

 

when Ruby was introduced I bought some books and planned on learning it

until I realized how lame it was

 

if I wasn't retired I would probably learn to use it for what it is

can't be bothered at this point

 

the problem is that the "living area label" OOB needs to be fixed

it causes confusion and frustration

hence this thread and the one Tommy referenced

 

Lew

Link to comment
Share on other sites

Love Ruby too, even though, I use it as much as Chief lets me, and want more. Almost all my plan notes are saved in a text macro. If you place many references of the same macro in your plan, then that note changes, just open up ruby and change the text and all instances of that macro changes automatically. Nifty if you ask me.

TIME SAVER!!!!

Link to comment
Share on other sites

Perry,

 

Maybe we should start posting our macros in a new thread for the benefit of the here

That would be nice but most of my notes wouldn't work for an other areas than Calif. b/c we have our own codes like CBC1405 etc. california building codes. Some of the macro's would be ok, it seems to me that a lot of people here just don't use macro's like they should be. Most of my macro's were given to me by others here over the last few years. Not sure if they want me spreading them around.

Link to comment
Share on other sites

I'd love to see how macros are being used 'out in the wild'. 

 

Any chance the macros could be pruned down so they show 'functionality' without revealing 'content'?

 

Has anyone done videos featuring 'macros'? I know CA has some videos dating back to X2 and X3 versions.

Link to comment
Share on other sites

FYI -- macros and RUBY were introduced with version X3. After that, Chief stopped development and made only perfunctory changes. Basically the X3 version hasn't changed much.

 

I made a introductory set of videos for X3 which are now somewhat out-of-date now. But the X3 Chief videos are decent enough.

 

You haven't seen much practical examples because there just aren't many practical uses of this feature. Chief pretty much "crippled" its use and limited it to Text and labels. There really isn't any reason to hide functionality since it's minimal. 

 

IMHO -- changes necessary to remove the "roadblocks" to practical usage are also minimal, which tells me that that Chief is not interested in extending this capability. Probably not enough interest???

 

There are a number of workarounds but most involve "global" memory with very limited benefits for the effort. Basically Chief has depreciated this feature -- again no interest.

 

if you have any specific questions I can answer, but most answers will be Chief deliberately prevents doing that. For now macros are mostly a dead end with only limited usage -- by design.

  • Upvote 1
Link to comment
Share on other sites

Thanks Gerry, your response clears up my confusion on why, even though I looked, I could only find macros associated with text and labels... I figured I was just not looking in the correct references.

 

That said, Perry, you indicate that even in their crippled form that macros and Ruby have helped make you more efficient, so I'll keep plugging away to understand the features that do exist.

 

Thanks.

Link to comment
Share on other sites

There are many things that you can annotate using Ruby macros and attributes that Ruby has access to.  Generally, this only works in Plan View and you have to have the correct relationship between the text macro and the object.

 

The first thing to understand is how to get at the attributes for any object.

 

1.  Select the Object and open the Ruby Console

2.  Enter "owner.names" which will list the attributes associated with that object.

3.  Assuming that one of the "names" is height, type "owner.height" and the height of the object will be displayed.

 

The next thing to understand is that a Text Object that references that object (usually by having an arrow pointing to the object) can retrieve the data.  If that Text Object has a macro embedded in it the data will be displayed instead of the macro name.  In the case of Chief's "Labels" such as a Door, Window or Room Label the macro can be directly embedded in the Default Label and it will then automatically display the data in each Label.

 

Owner and Referenced context must be properly defined for each macro.  Macros specified in Labels or in Text Objects need to be in the form %macro_name%.  In most cases numerical values will not be in the format you want and you will need to have the macro perform calculations and formatting to get the text you want displayed.

 

There is a lot to learn to use macros to the ultimate possibility and - as Gerry pointed out - Chief has not given us access to enough of the model data so that everything could be automated.

  • Upvote 1
Link to comment
Share on other sites

Here are some examples of macros for Stairs:

 

Stair_Risers_Imperial_Short

# This Displays the number & Height of Risers

nR = num_treads+1
cText = nR.to_s

# Convert Decimal Values to Fractions
inches = riser_height.round
case
when inches > riser_height
  inches = inches-1
end
frac =( (riser_height-inches)*16).round.quo(16)
case
when frac == 1
  result = "#{inches + 1}"
when frac == 0
  result = "#{inches}"
else
  result = "#{inches} #{frac}"
end

# 'Risers = '+cText+' @ '+riser_height.round(2).to_s+'"'
# 'Risers = '+cText+' @ '+result+'"'
cText+" Risers @ "+result+'"'

 

Stair_Treads_Imperial_Short

# Displays Number & Size of Treads
# Convert Decimal Values to Fractions
inches =tread_depth.round
case
when inches > tread_depth
  inches = inches-1
end
frac =( (tread_depth-inches)*16).round.quo(16)
case
when frac == 1
  result = "#{inches + 1}"
when frac == 0
  result = "#{inches}"
else
  result = "#{inches} #{frac}"
end

#Display Results
# 'Treads = '+num_treads.to_s+' @ '+result+'"'
num_treads.to_s+' Treads @ '+result+'"'

 

Stair_Width_Imperial

# Convert Decimal Values to Fractions
inches =width.floor
frac =( (width-inches)*16).round.quo(16)
case
when frac == 1
  result = "#{inches + 1}"
when frac == 0
  result = "#{inches}"
else
  result = "#{inches} #{frac}"
end

#Display Results

'Stair Width = '+result+'"'

 

The 3 lines in the text box shown in the pic below are created by the above macros.

 

 

post-47-0-10423700-1409072243_thumb.jpg

  • Upvote 1
Link to comment
Share on other sites

Barton, text macro's are so easy to do, you just type it in and save it. Then you never have to save it again.

Here is an example just copy it to your plan and open ruby and look at it.

This is the easiest macros you can make.

Thanks Perry!  

One question: I understand the use of macros that evaluate or display information pulled from an object. In your example, why would one prefer this type of macro over just a CAD block with the same, non-changing information. I'm still learning so the answer may be obvious, please excuse my ignorance if it is. Thanks.

Link to comment
Share on other sites

Barton, text macro's are so easy to do, you just type it in and save it. Then you never have to save it again.

Here is an example just copy it to your plan and open ruby and look at it.

This is the easiest macros you can make.

Perry turned me onto this and I am forever grateful.  Pretty cool stuff.  Thanks again P.

Link to comment
Share on other sites

Barton, the answer is that if you want to change anything within the text, all instances of that macro changes with it.  Like code references . Just open the ruby macro and change it there..

 

Scott, I'm happy to turn you on, anytime

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