Jump to content
Developer Wiki and Function Reference Links ×

Text Alignment


Recommended Posts

I am having difficulty getting text to insert different from the document defaults. I use the Set Char Properties, and set alignment there, but it only does it after the text has been inserted. So if I am Top Left justified in doc setting, it will insert it there, then change to the Center Center I set in the node, but the text stays where it was initially drawn. I don't see a node that can set the defaults, or anyway to change it before I get the text string. What am I missing?



Link to comment
  • 2 weeks later...
  • 2 weeks later...

Hi Antonio. 


The Set text properties has the same problem as you mentioned and I mentioned, they both set the alignment after the text is placed. I want to place the text with the alignment already set so the text is placed where I want it. Any ideas for that?


Link to comment


To answer your initial question:

No, there's no node with which you can currently change the text document settings.

But it's pretty easy using the command vs.SetPrefInt()

See also https://developer.vectorworks.net/index.php/VS:SetPrefInt

and here https://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#apppref

search for TextJustification and you will find all the info you need.


I am still not fully clear on what the issue is. The text alignment that is applied after creating the text object is independent from the document settings.

Now, if you wanted to chose a reference point on the text object which is not the same as the text alignment, that would be a different story.

For example let's say the created text object has "center" as a horizontal alignment, but you want the right edge of the text object to be at a certain x-value.


If this is not what you mean and still have questions, please upload an image or a video explaining what is happening in your document.

Link to comment

@Antonio Landsberger

You have pinned what I have been wrongly trying to correct. Yes, what I want is to insert the text on a chosen reference point in the text. I never thought of that, so I was trying to figure out how to do it with alignments. How would one place text on a reference point, of my choosing, in the text field? 

Link to comment



if the text is always just centered you can also use the "get 2D Center" Node.

Then the Network could look like this:


This Network uses the 2D information of the text object and takes advantage of the fact that the 2D center of the text object is the same as the center of the text (or at least i hope it always is). Like this you dont have to worry about the vectorworks preferences.



- The network shown above only works for inserting the text object at its center

- Although the insertion point of the text object ist its center, the text can be aligned differently

- You can change the "Get 2D Center" node to the "Get 2D Point" to use one of the 4 vertecies of the text object as the insertion point

Edited by Letti R
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...