Area display both in imperial and metric


HaroonMalik
 Share

Recommended Posts

3 hours ago, HaroonMalik said:

Hi Alaskan,

 

Thank you for your help. Unfortunately I did not get you.

 

I want the area to be displayed in both formats simultaneously same like dimensions displays in both formats. Like 92 Sq Ft / 8.54 Sq M. Refer attached image.

 

Thank you.


I’m no macro genius, but here’s my method:

 

1) select room and “make room polyline” (I put these polylines on a separate layer so I can turn them on and off)

2) In the “label” of the polyline specify a “user Defined label from the list” (a macro that you’ll create in step 3)

3) now you need to create a macro for that list:

        3a) Go to menu > CAD > Text > Text Macro Management > New

        3b) >Name: Give your macro a Name, ex. roomAreaMetric

        3b) >Value:  “((area)*(0.9290304)).round(2)” <- type the crap between the quotes, don’t ask.

        3c) > check “Evaluate”

        3d) > Context = “Owner Object”

        3e) > OK

Your polyline will have the area in metric rounded to 2 decimal places. (that’s what the “2” is in the “round(2) part of the formula. 
 

If you want both imperial and metric in the same polyline label then you can add a second line in the polyline label which is just:

“%area.round% sq.ft” 

 

 

Screen Shot 2020-12-10 at 11.33.32 PM.png

Screen Shot 2020-12-10 at 11.35.11 PM.png

Screen Shot 2020-12-10 at 11.37.50 PM.png

Link to comment
Share on other sites

15 hours ago, solver said:

What Michael posted above, but, what's between the % signs needs to be lower case.

 

 

Imperial Area = %room.standard_area.to_sq_ft.round% sq ft

 

Metric Area = %room.standard_area.to_sq_m.round(2)% sq m


There’s nothing wrong with the ALL CAPS. I did that on purpose because that’s the format the OP was using.

 

EDIT:  I see based on some of the follow-up conversation below that this needs some clarification.  The text I posted above is not truly capitalized letters.  It's Rich text formatted to Uppercase.  So I guess you are in fact correct.  The macros need to be typed in lowercase.  You should however still be able to simply copy and paste what I posted above because what you see is only formatting.

  • Like 1
Link to comment
Share on other sites

50 minutes ago, Michael_Gia said:


I’m no macro genius, but here’s my method:

 

1) select room and “make room polyline” (I put these polylines on a separate layer so I can turn them on and off)

2) In the “label” of the polyline specify a “user Defined label from the list” (a macro that you’ll create in step 3)

3) now you need to create a macro for that list:

        3a) Go to menu > CAD > Text > Text Macro Management > New

        3b) >Name: Give your macro a Name, ex. roomAreaMetric

        3b) >Value:  “((area)*(0.9290304)).round(2)” <- type the crap between the quotes, don’t ask.

        3c) > check “Evaluate”

        3d) > Context = “Owner Object”

        3e) > OK

Your polyline will have the area in metric rounded to 2 decimal places. (that’s what the “2” is in the “round(2) part of the formula. 
 

If you want both imperial and metric in the same polyline label then you can add a second line in the polyline label which is just:

“%area.round% sq.ft” 

 

 

Screen Shot 2020-12-10 at 11.33.32 PM.png

Screen Shot 2020-12-10 at 11.35.11 PM.png

Screen Shot 2020-12-10 at 11.37.50 PM.png


Your method is WAY over complicated.  You should read my first post too.  

Link to comment
Share on other sites

26 minutes ago, Alaskan_Son said:

Your method is WAY over complicated.  You should read my first post too.  

My way is definitely convoluted but I need to be able to control those independently of the room size. As in, stretch a polyline to see what area it gives before I make a modification to a room or area. 
 

I also forgot a decimals place in my calculation. 
 

However your calculation doesn’t return the correct area. I copied and paste and got 6.97 sq m instead of 5.2 sq m in my little plan. 

Link to comment
Share on other sites

Generally you shouldn't argue with Michaei (Alaskan Son) when it comes to macros.  - or me either for that matter :lol:

I would have posted the same solution as he did, but I would probably have made it a bit more bullet proof so that it wouldn't indicate an error if not attached to a room - just my preferred way of coding.

Link to comment
Share on other sites

2 hours ago, solver said:

 

 

How are you copying and pasting that Eric?  It looks like you're actually bringing in truly capitalized text somehow whereas my posted text was simply Rich Text formatted to Uppercase.  That being said, and reading back through our back and forth, I can see there some clarification is warranted...

 

You are correct.  True ALL CAPS does not work.  The macros should be typed in using lower case letters.  Uppercase formatting (what I posted above) should work just fine though.  I'm still curious how you managed to copy and paste my text as actual uppercase letters though.

Link to comment
Share on other sites

17 minutes ago, solver said:

The browser I use is based on Chrome, and I just tried Chrome and it works the same -- both keep the uppercase.

 

That seems really weird because it suggests that the browser recognizes the formatting (as evidence by the fact it displays the text as ALL CAPS; however, instead of simply carrying the formatting information, it's actually losing that information and converting the text to capitalized letters.  This behavior is something that typically requires an add-on or extension. 

Link to comment
Share on other sites

On 12/10/2020 at 5:49 PM, Alaskan_Son said:

Imperial Area = %room.standard_area.to_sq_ft.round% sq ft

Metric Area = %room.standard_area.to_sq_m.round(2)% sq m

I just your video for Eric...I also get all caps when copying and pasting. No question here, I'm going to search a bit and see if I can find out why.

EDIT:

And there it is...in your edited post way up near the beginning. That was what I suspected.

Link to comment
Share on other sites

3 minutes ago, robdyck said:

I just your video for Eric...I also get all caps when copying and pasting. No question here, I'm going to search a bit and see if I can find out why.


good to know. I believe that’s the first time I actually posted a pre-formatted macro like that.   I just won’t do it anymore.

Link to comment
Share on other sites

  • 3 months later...
1 hour ago, dskogg said:

looking for a polyline metric area label...can anyone tell me how to do this?

In an imperial plan

 

Many ways, here's an easy one though...

%area.to_sq_m.sq_m%

...Converts the square feet to square meters and then displays that numerical value as rounded square meters with notation (as long as you have Use Default Formatting checked). 

 

You could also use...
%area.to_sq_m.round(2)%m²

Link to comment
Share on other sites

  • 1 month later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share