VS:LinkText: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
(Added remarks on how LinkText seems to need to happen after EndSym now) |
||
(One intermediate revision by one other user not shown) | |||
Line 40: | Line 40: | ||
</lineList> | </lineList> | ||
</params> | </params> | ||
<remarks> | |||
rgm 2021.11.23 - this now has to happen immediately *outside* the BeginSym/EndSym and after the record has been attached to the symbol definition, since sometime around VW2019. Otherwise, the links don't take and the symbol instances don't respond to the attached records. I figured this out by setting up a linked-text symbol in a blank file and examining the order of commands using File > Export > Export Script... | |||
See also https://forum.vectorworks.net/index.php?/topic/62434-linkedtext/#comment-311318 | |||
</remarks> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
Latest revision as of 00:11, 24 November 2021
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Creates a linked text field in a newly created symbol. The specified text is linked to a record field, whose value is displayed by the text object.
LinkText must be called during symbol creation; the record to be associated with the linked text string must also exist at the time the link is created.
PROCEDURE LinkText(
h :HANDLE;
rec :STRING;
fld :STRING);
def vs.LinkText(h, rec, fld): return None
Parameters
h HANDLE Handle to text object that will be linked to record. rec STRING Name of record that will be linked to text string. fld STRING Name of field that will be linked to text string.
Example
VectorScript
BeginSym('Symbol #2'); Oval(-3/4",1/2",3/4",-1/2"); TextFont(3); TextSize(12.00037); TextJust(1); TextOrigin(0.8611111",0.5138889"); BeginText; 'Field 9 String' EndText; LinkText(LNewObj,'Sample Format','Field 1'); EndSym; Record(LNewObj,'Sample Format');
Python
Version
Availability: from All Versions
See Also
VS Functions:
VS Functions:
[[VS:BeginSym]]
| [[VS:EndSym]]