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

Get the world coordinate of a character in a text/element

Hi

Given the nth character in a text element, is it possible to easily get that characters position in world coordinates?

It could probably be calculated from a combination of API_TextType, API_ParagraphType and maybe API_FontType but it would be tricky to cover every case. Is there an easy way to do it? I could not find anything readily available in the API documentation. 

BenjiDev_0-1711573074007.png

 

1 Solution

Accepted Solutions

Hi Benji,

 

I don't know of any readily available function. I only found ACAPI_Element_GetTextLineLength. With that it might be worth a try to get the line length of the substring ending just before the character you are interested in. That could at least simplify that part.

 

Hope that helps,
Bernd

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com

Go to post

2 Replies 2

Hi Benji,

 

I don't know of any readily available function. I only found ACAPI_Element_GetTextLineLength. With that it might be worth a try to get the line length of the substring ending just before the character you are interested in. That could at least simplify that part.

 

Hope that helps,
Bernd

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com
BenjiDev
Enthusiast

Ah, surely will be useful for what I'm trying to do, thanks Bern!

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!