cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Jarrod Phillips
Enthusiast

Font Type Not Working Through Subtype Parameter

Hi All,

 

I am having an issue where I have created a font type parameter in an object subtype, however the font type doesn't want to work in the child object.

 

JarrodPhillips_0-1707201317908.png

 

See script below:

 

 

Parameter in subtype = fta_font_type (string)

 

 

2D script

 

define style "fontStyle1" fta_font_type, fta_font_size, 5, fta_iFont_effects    !LABEL FONT STYLE
style "fontStyle1"

 

Interface Script

 

ui_infield{2} 'fta_font_type', _uiXRight, _uiY, _columnWidth, _fillHeight ui_tooltip "Font Type"
_uiY = _uiY + (_fillHeight + _buttonGap1)

 

Cannot for the life of me workout why it's not working, any assistance would be greatly appreciated.

 

Regards,

 

Jarrod

BIM Manager | Graduate of Architecture
Fulton Trotter Architects - Sydney, Australia
Archicad 15 - 27
3 Solutions

Accepted Solutions
Barry Kelly
Moderator

That won't give you a list of available fonts.

You will have to type the font name exactly in that field.

 

You can either create your own VALUES list for the 'fta_font_type' variable, where you can list specific font names.

Or this (in the parameter script) will search your operating system and give you a list of all of the installed fonts.

 

 

DIM fontNames[]
n = REQUEST("FONTNAMES_LIST", "", fontNames)
VALUES "fta_font_type" fontNames, CUSTOM

 

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Go to post

Hi Jarrod

 

ToperBarrientos_0-1707203521876.png

 

We can change the variable name that represents your text style with the parameter shown on the picture (default by the Label subtype).

Device name Asus v16
Processor Intel(R) Core(TM) 5 210H 2.20 GHz
Installed RAM 16.0 GB

Go to post

Barry Kelly
Moderator

Good catch.

I forgot about these fixed name optional parameters.

It seems you can use AC_TextFont_1 up to AC_TextFont_8, should you need different fonts for different reasons all in the one object.

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Go to post

5 Replies 5
Barry Kelly
Moderator

That won't give you a list of available fonts.

You will have to type the font name exactly in that field.

 

You can either create your own VALUES list for the 'fta_font_type' variable, where you can list specific font names.

Or this (in the parameter script) will search your operating system and give you a list of all of the installed fonts.

 

 

DIM fontNames[]
n = REQUEST("FONTNAMES_LIST", "", fontNames)
VALUES "fta_font_type" fontNames, CUSTOM

 

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Hi Jarrod

 

ToperBarrientos_0-1707203521876.png

 

We can change the variable name that represents your text style with the parameter shown on the picture (default by the Label subtype).

Device name Asus v16
Processor Intel(R) Core(TM) 5 210H 2.20 GHz
Installed RAM 16.0 GB

Barry Kelly
Moderator

Good catch.

I forgot about these fixed name optional parameters.

It seems you can use AC_TextFont_1 up to AC_TextFont_8, should you need different fonts for different reasons all in the one object.

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Jarrod Phillips
Enthusiast

All excellent solutions, thank you!

BIM Manager | Graduate of Architecture
Fulton Trotter Architects - Sydney, Australia
Archicad 15 - 27
Peter Baksa
Graphisoft
Graphisoft

Hi,

 

Showing the font list can be done without parameter script: https://gdl.graphisoft.com/tips-and-tricks/font-names-list-handling-in-ui-script

 

The parameters which have a font list come from libparts under subtype "Library Master". These are executed when the library is loaded, and their parameters' value ranges are inherited by all other library parts. https://gdl.graphisoft.com/gdl-basics/parameter-logic

 

 

Péter Baksa
Software Engineer, Library
Graphisoft SE, Budapest

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!