cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

A "Smart" roof label

Anonymous
Not applicable
I've searched this forum and can't find anything.

I want to make/get a label object that can be used in the following manner:

Click on a roof then click on the desired location for the label. The label needs to display the rise and run of the 'clicked on' roof.

Is this possible? and How?
82 REPLIES 82
Anonymous
Not applicable
Dan wrote:

Pawel,
That's great...thanks for the improvements. I guess the text in "mm" makes better sense for all the metric users. In the US we use points "pt" for text...I 've always been aggravated that we don't have a good straightforward way to script for point text in objects
Do you have any suggestions for scripting text in point values?
Dan K


Hi, Dan!
I know that European (metric) and US dimensions standards are differents. I was made some changes in Your labels for my preferences. I thing that tomorrow, I'll make some changes in Your label for "non metric" users.

Best regards
Pawel
Anonymous
Not applicable
Dan,
I use the following code for scripting text in point values

"fntz" is a floating point numeric parameter to set the font size.
"ss" is a boolean parameter to make text scale with plan (Yes/No).
"fnt" is text parameter to set the font family.
and "pt" is defined below to convert "fntz" to points.

pt=((fntz*25.4)/72)

Depending on your purpose,
you may need to change this code to:

if ss then
pt=((fntz*25.4)/72)*48/A_
else
pt=((fntz*25.4)/72)
endif

or

if ss then
pt=((fntz*25.4)/72)*1/A_
else
pt=((fntz*25.4)/72)
endif

define style mystyle fnt,pt,1,0
set style mystyle

Peter Devlin
Anonymous
Not applicable
Peter wrote:
Dan,
I use the following code for scripting text in point values...
Thanks Peter!

Your info was really helpful. I've updated the part based on it. I added a new parameter that allows the end user to select a "Font Unit Type" so they can size the fonts in points or millimeters. There's also a parmeter to select for scale sensitivity.

I'm still kinda' debating how I've have the variables set up to define the (pt) and (mm) sizes. Right now I have seperate varibles for each condition, but am considering combining them into one variable...maybe the attached image will make more sense.

Peter, If you have time please let me know your thoughts on this. The updated object will follow in the next post.

Dan K
RoofSlopeInfo3.jpg
Anonymous
Not applicable
Here's Version 6 of the roofslope accessory

I added a new parameter that allows the end user to select a "Font Unit Type" so they can size the fonts in points or millimeters. There's also a parameter to select for scale sensitivity.


If any "metric" users out there test it, please let me know if the "fontsize in millimeters" works the way you work.

Thanks,
Dan K
Anonymous
Not applicable
Dan,
Your code seems unnecessarily complicated to me.
Would the following work?

if unittype="font size in points" then
size=((fntz*25.4)/72)
endif
If unittype="font size in mm" then
size=fntz
endif

define style mystyle fnt,size,1,0
set style mystyle

I am using my code here because I can't tell what some
of your variable names are.

Peter Devlin
P.S. I wonder, in this context, why you need scale sensitivity.
Anonymous
Not applicable
Peter wrote:
Dan,
Your code seems unnecessarily complicated to me.
Would the following work?

if unittype="font size in points" then
size=((fntz*25.4)/72)
endif
If unittype="font size in mm" then
size=fntz
endif

define style mystyle fnt,size,1,0
set style mystyle

I am using my code here because I can't tell what some
of your variable names are.

Peter Devlin
P.S. I wonder, in this context, why you need scale sensitivity.

Peter,
Thanks for the reply....yes, I agree my script is a little complex. Yours is pretty straight forward...I'll look at simplifying mine a little.

As far as scale sensitivity goes:
Imagine if your office standard is to have a certain consistent font size for all your drawings. Now consider if your viewset for floorplans is set to 1/4" scale and your viewset for roofplans is set for 1/8" scale....If you don't have scale sensitivity, you would need to indicate a different font size for each condition. If you use scale sensitivity, you will always have the same font size without having to think about it.

Now, what if someone decides to redefine the roof plan viewset to make the scale even smaller...say 1/16"...now you have to change the font yet again for the sizes to stay consistent.

I know it's not rocket science to manage different font sizes for different scales, but its just another decision I prefer not to have to think about.
When you work with multi-seat Archicad clients, the KISS modeling principle is the rule of the day.

Thanks for input,
Dan K
Aussie John
Newcomer
Peter

remove the "*A_" from the four text definitons and change the default text sizes in the parameters to a say 2.5 or 3 and the text will look ok and stay the same size
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
Anonymous
Not applicable
John,
I am confused.
Where have I written "four text definitons" ?
Peter Devlin
Aussie John
Newcomer
Peter wrote:
John,
I am confused.
Where have I written "four text definitons" ?
Peter Devlin
Sorry I was talking about the original script by Dan
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
Anonymous
Not applicable
Hi,
Any one using this tool Label "RoofSlope_accessory_V6.zip"with the latest AC9 patch, For some reason it does not show up in the Label Settings options. The folder it is located, is being loaded. I am on Mac and changed the long file name of it by saving it with a short name. It is a create tool would like to continue using it.
Thanks,
Joseph