VS:BeginText: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
 
m (add remark)
(2 intermediate revisions by one other user not shown)
Line 10: Line 10:


To specify the insertion point of the new text object, use TextOrigin.
To specify the insertion point of the new text object, use TextOrigin.
<b>Note:</b> This function is not available in Python. Use [[VS:CreateText]] instead.
</desc>
</desc>


Line 16: Line 18:
<funcDef lang="vs">
<funcDef lang="vs">
PROCEDURE BeginText;
PROCEDURE BeginText;
</funcDef>
<funcDef lang="py">
def vs.BeginText():
    return None
</funcDef>
</funcDef>
</def>
</def>
Line 37: Line 35:
EndText;
EndText;
</code>
</code>
==== Python ====
 
<code lang="py">
-----------------------------------------------------------------------------------------------------------
#{ Create a multiple line text object at 0,0 }
<seeAlso>
vs.TextFont(vs.GetFontID('Monaco'))
VS Functions:
vs.TextSize(24)
[[VS:EndText]]
vs.TextOrigin(0,0)
| [[VS:CreateText]]
vs.BeginText()
</seeAlso>
'This multiple line text block
 
is in 24pt Monaco and was created
-----------------------------------------------------------------------------------------------------------
by a VectorScript.'
<remark>
vs.EndText()
([[User:Orso.b.schmid|Orso]], 2015 Dec. 19): If you draw text, it is important to have a proper text size on the document or you'll see the error "An incorrect object is described".
</code>
</remark>
</sample>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------

Revision as of 03:41, 19 December 2015

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Procedures BeginText creates a new text object in a VectorWorks document. All text specified between calls to BeginText and EndText will be part of the new text object.

Text may be specified in single quotes, or variables may be used..

To specify the insertion point of the new text object, use TextOrigin.

Note: This function is not available in Python. Use VS:CreateText instead.

PROCEDURE BeginText;

Remarks

(Orso, 2015 Dec. 19): If you draw text, it is important to have a proper text size on the document or you'll see the error "An incorrect object is described".

Version

Availability: from All Versions

See Also

VS Functions:

VS:EndText | VS:CreateText

VS Functions:

[[VS:EndText]]

| [[VS:CreateText]]