How to align text in Title of detail?

How to align text in Title of detail?

Anonymous
Not applicable
2,265 Views
11 Replies
Message 1 of 12

How to align text in Title of detail?

Anonymous
Not applicable

Good day

 

Can someone please explain how to center the titles in a multi-line heading when editing the drawing styles manager, so that the titles appear centered as in the second picture?

 

I assumed using ctr + E shortcut would center it, as in Word, however it doesn't carry of over to the actual drawings.

Using spaces does also not work as the lines are not centered exactly due to the tokens having various changing lengths.

 

Thanks for any help provided.

 

 

 

Title of detail.PNGTitle of detail - centered.PNG

Accepted solutions (1)
2,266 Views
11 Replies
Replies (11)
Message 2 of 12

Anonymous
Not applicable

I would be grateful for this information too.

0 Likes
Message 3 of 12

johnjmbennett
Mentor
Mentor
I don’t not think this is possible, automatically. If you change the text to see the actual text string, there are things like #newline , #colour. I am not aware there is a syntax that allows the centering. To acces the code, there is a icon at top right In the menu area, press that an the string changes.

John Bennett
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 4 of 12

Sebastian_Eiche
Mentor
Mentor

I'm relatively sure that this is not adjustable as @johnjmbennett already told. But a way could be to insert only the first line by title block and additional a label for mainparts...I think noone label it extra in mp details so this label strategy could be used to insert the information and then you had to move the label under the title name. 

I know it's not the way it should work, maybe you create an idea in the idea station for it.


Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

0 Likes
Message 5 of 12

Anonymous
Not applicable
0 Likes
Message 6 of 12

john_mcfaddenGY4B4
Enthusiast
Enthusiast

Has anyone figured out how to do this?

0 Likes
Message 7 of 12

j.hamelin
Collaborator
Collaborator

There’s still no option to do that, and there never will be, since Advance Steel is in maintenance mode.

Mechanical Design Drafter

If this information was helpful, please use the Accept as Solution function, this make it easier for other users.
Message 8 of 12

D_Waeldele
Advocate
Advocate
Accepted solution

I was interested myself, so I tried the following.

 

You could try it with VBScript. There's no centering option here either, but you could pad the text with spaces accordingly.

 

The VBscript:

%%script(var1=Len("%Note"): var2=Len("%Scale"))#Newline%%script(if Len(var1)>=Len(var2)then var3=var1 else var3=var2)#Newline%%script(appendstring(space(var3-var1)&"%Note"))#Newline%%script(appendstring(space(var3-var2)&"%Scale"))

 

I have divided it into 4 separate instructions.

#Newline                                                                                                                      --> New line 

%%script(var1=Len("%Note"): var2=Len("%Scale"))                                            --> find the lenght from the text

%%script(if Len(var1)>=Len(var2)then var3=var1 else var3=var2)                    --> finds the longest text and stores it in var3

%%script(appendstring(space(var3-var1)&"%Note"))                                        --> outputs the corresponding number of spaces and the text in the first line

%%script(appendstring(space(var3-var2)&"%Scale"))                                       --> the same in line 2

Screenshot 2026-01-18 102834.jpg

Screenshot 2026-01-18 103814.jpg

Whether this makes sense is up to each individual to decide; it's purely about aesthetics. I haven't needed it anywhere yet, so I only added it manually to the drawing.

An error message appears if there's a spelling mistake or a missing parenthesis, and sometimes the %%Script( instruction is removed, leaving only normal text in the line.

 

If this information was helpful, please use the Accept as Solution function, this makes it easier for other users.
Sorry, this text was automatically translated.
Message 9 of 12

Sebastian_Eiche
Mentor
Mentor

that's really nice! 

I'm not sure if the %%script is needed every line, this maybe is the problem with the spelling error. But the script itself is very good.


Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

Message 10 of 12

john_mcfaddenGY4B4
Enthusiast
Enthusiast

Thanks for the info! However in my situation, padding the text with spaces won't work as my scales vary from such as 1/4" = 1'-0" to 1 1/2" = 1'-0" etc etc so I would end up having an uncentered 2nd line of text at some point.

0 Likes
Message 11 of 12

D_Waeldele
Advocate
Advocate

I'm a beginner in programming, so I've split the script into several lines for better clarity.

Surely you could enter that in one line.

If this information was helpful, please use the Accept as Solution function, this makes it easier for other users.
Sorry, this text was automatically translated.
0 Likes
Message 12 of 12

D_Waeldele
Advocate
Advocate

I tried it with a multiplier and in the German version it worked.

D_Waeldele_0-1768849187257.png

 

Screenshot 2026-01-19 195603.jpg

If this information was helpful, please use the Accept as Solution function, this makes it easier for other users.
Sorry, this text was automatically translated.