Ceiling Height Label?


ACADuser
 Share

Recommended Posts

Here we are on 2017 & I see no way to display my Mtext label of ceiling height in Feet & Inches.
There are threads way back in 2011 talking about this shortfall.
I work in inches so the label displays in inches. Is there no build-in macro to convert inches to Ft'-In" ?

My label
%room.name%
Ceiling%room.elevation.ceiling%  

I see Joe has a subroutine in his FloarClass.rb but I haven't a clue how to use it.
It should be part of Chief.

Link to comment
Share on other sites

Alan,

 

The Room macros supplied by Chief only display in inches and the values are not returned to ruby as actual values. 

 

However, I have a %Ceiling Height Label% macro that converts to ft-in using the subroutine you mentioned.  That macro can be inserted in the Default Room Label - or in any individual Room Label.  Unfortunately it will not work in a RTB.

 

The problem with Chief adding every possible formatting is that there are so many possibilities for customization.  They actually made a mistake IMO of calling their custom labels "macros".  Internally they refer to them as "Name:Value" pairs.

 

Link to comment
Share on other sites

Alan, If the question is how do you use Joe's macro from FloatClass, - you go to menu CAD - Text - Text Macro Management and then import the json file. Once you see it in your list of text macros, instead of putting :

%room.name%
Ceiling%room.elevation.ceiling%

 

you would put :

%room.name%
Ceiling%Ceiling Height Label%

 

Joe, did I get that right?

Andy

Link to comment
Share on other sites

2 hours ago, andypapamarcos said:

Joe, did I get that right?

Sort of.....  FloatClass.rb only needs to be in the scripts folder - it's not a json file & doesn't need to be imported.

The %Ceiling Height Label% macro uses the FloatClass.rb file.  I don't know if Alan has %Ceiling Height Label% or not. 

Link to comment
Share on other sites

Here

 

Create a new macro name it "CeilingHeight"

Paste the following

 

val = (ceiling_elevation-floor_elevation).divmod(12)
inch_frac = ((val[1]-val[1].floor)*16).round.quo(16)
 
result = case inch_frac
  when Rational(1.0)
    "#{val[0]}'-#{val[1].ceil}\""
  when Rational(0.0)
    "#{val[0]}'-#{val[1].floor}\""
  else
    "#{val[0].floor}'-#{val[1].floor} #{inch_frac}\""
  end

 

Now Edit>Default Settings>Floors and Rooms>Room Label>

Into Text enter

<CR>

%CeilingHeight%

 

Where <CR> is carriage return.

Now go back and double click on your room and change show room label check box to unchecked and back to checked and click ok. 

 

Link to comment
Share on other sites

49 minutes ago, BrownTiger said:

Now go back and double click on your room and change show room label check box to unchecked and back to checked and click ok. 

 

Actually, all you have to do is open the room and then click okay and it will update to reflect the new default room label. 

Link to comment
Share on other sites

Here's a quick example plan and layout using a method you can use to essentially create a Rich Text version of those room labels... 

Labels.thumb.jpg.96dfad2018b0c505739e1371d24222af.jpg

Alan's example.plan

Alan's example.layout

 

I went over the basics of the method in another thread over in the Tips and Techniques section but essentially you need to:

  1. Use a custom macro in the default room label (I just used a modified version of the macro BT posted above for this example that is set to display only the room name when the layer set includes the number 2).
  2. Use a solid fill in your default room label (not actually necessary but the technique gets a fair bit more complicated if you don't do this).
  3. Set up a couple different room label text styles (one for the room name and another for the ceiling height).
  4. Overlap a couple layout boxes in layout using 2 different layer sets (one with nothing but room labels being displayed.
  5. Move the appropriate layout box to the front group, and shift it up or down as necessary to get the appropriate text spacing (this step isn't actually absolutely necessary either, but then again the technique starts to get a bit more complex).

Once you figure it out, its actually a lot faster and easier than it sounds.

Link to comment
Share on other sites

14 minutes ago, ACADuser said:

I think Eric nailed it with the "Owner Object", so I have it working.

 

Also why do the built in macro's  work in Mtext & Text for room labels and this one won't?

 

 

2 things...

 

1.  I would recommend you use the term Rich Text as only other AutoCAD users will likely understand what Mtext means.

2.  Chief basically has 2 different macro types...Global, and User Defined.  Global macros have some unique subsets of macros that recognize WHERE in the plan they exist.  One of those subsets is something some of us refer to as "room context".  This is how the global Room Info macros work...they recognize the room they were placed in and report the appropriate value.  Currently we cannot use a User Defined macro in this same manner and so we're limited to using the OOB global macros for any room information we want to use in a standard text box or a rich text box.  I'm pretty sure I could get around this by writing to and reading from an external text file (which I've done in the past in order to create some automated room numbering) but that would require some pretty complex macros and methods.  This is the reason Joe, myself,and probably Gerry and others have requested in the past that we be given a Room Context for User Defined text macros so we could create our own custom macros that could be used in Text and Rich Text boxes for use as room labels.

Link to comment
Share on other sites

10 minutes ago, ACADuser said:

Joe, yours is still not working.

Looking at the code  cRequired = ["Float Class.rb", "Hash Class.rb", "DwgUnits.rb"]

I only have Float Class.rb in my Scrips folder

 

OK, edit that macro line so that it is only:

  • cRequired = ["Float Class.rb"]

I'm also going to email the other 2 rb files.

 

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