|
|
Line 1: |
Line 1: |
| {{LocationMain|category=LocationVS|specific=}} | | {{LocationMain|category=LocationVS|specific=}} |
| __TOC__
| |
| <vwDoc>
| |
|
| |
| -----------------------------------------------------------------------------------------------------------
| |
| <desc>
| |
| Returns information on the referenced roof face object.
| |
|
| |
| {| class="wikitable_c"
| |
| |+ Table - Roof Miter Styles
| |
| ! Miter Style !! Constant
| |
| |-
| |
| | Vertical
| |
| | 1
| |
| |-
| |
| | Horizontal
| |
| | 2
| |
| |-
| |
| | Double
| |
| | 3
| |
| |-
| |
| | Square
| |
| | 4
| |
| |}
| |
| </desc>
| |
|
| |
| -----------------------------------------------------------------------------------------------------------
| |
| <def>
| |
| <funcDef lang="vs">
| |
| PROCEDURE GetRoofFaceAttrib(roofFace:HANDLE; VAR roofRise:REAL; VAR roofRun:REAL; VAR miterType:INTEGER; VAR holeStyle:INTEGER; VAR vertPart:REAL; VAR thickness:REAL);
| |
| </funcDef>
| |
| <funcDef lang="py">
| |
| def vs.GetRoofFaceAttrib(roofFace):
| |
| return (roofRise, roofRun, miterType, holeStyle, vertPart, thickness)
| |
| </funcDef>
| |
| </def>
| |
|
| |
| -----------------------------------------------------------------------------------------------------------
| |
| <params>
| |
| <lineList ident=1>
| |
| <line>
| |
| roofFace
| |
| HANDLE
| |
| Handle to roof face object.
| |
| </line>
| |
| <line>
| |
| roofRise
| |
| REAL
| |
| Rise of roof.
| |
| </line>
| |
| <line>
| |
| roofRun
| |
| REAL
| |
| Run of roof.
| |
| </line>
| |
| <line>
| |
| miterType
| |
| INTEGER
| |
| Miter style of roof.
| |
| </line>
| |
| <line>
| |
| holeStyle
| |
| INTEGER
| |
| Miter style of openings.
| |
| </line>
| |
| <line>
| |
| vertPart
| |
| REAL
| |
| Vertical component of compound miters.
| |
| </line>
| |
| <line>
| |
| thickness
| |
| REAL
| |
| Thickness of roof.
| |
| </line>
| |
| </lineList>
| |
| </params>
| |
|
| |
| -----------------------------------------------------------------------------------------------------------
| |
| <remark>
| |
| [[User:CBM-c-|_c_]], 2015.12.18:
| |
| Hole style of openings:
| |
| : 1 Vertical
| |
| : 3 Splayed
| |
| : 4 Square Cut
| |
|
| |
|
| |
| Other authors:
| |
| * Returns information about old-style roof objects (single roof faces).
| |
| * Returns slope, edge miter style, miter dimensions, and thickness of roof object.{{LocationMain|category=LocationVS|specific=}}
| |
| __TOC__ | | __TOC__ |
| <vwDoc> | | <vwDoc> |
Line 194: |
Line 105: |
| [[Category:VS Function Reference|CreateText]] | | [[Category:VS Function Reference|CreateText]] |
| [[Category:VS Function Reference:Objects - Text|CreateText]] | | [[Category:VS Function Reference:Objects - Text|CreateText]] |
|
| |
|
| |
| See Also [[VS:GetRoofFaceCoords| GetRoofFaceCoords]]() for additional roof face data</remark>
| |
|
| |
| -----------------------------------------------------------------------------------------------------------
| |
| <sample>
| |
| {{GetRoofProperties}}
| |
| </sample>
| |
|
| |
| -----------------------------------------------------------------------------------------------------------
| |
| <version>
| |
| Availability: from VectorWorks 9.0
| |
|
| |
| </version>
| |
|
| |
| </vwDoc>
| |
|
| |
| [[Category:VS Function Reference|GetRoofFaceAttrib]]
| |
| [[Category:VS Function Reference:Objects - Roofs|GetRoofFaceAttrib]]
| |
Latest revision as of 05:26, 15 January 2021
.VectorScript|VectorScript
..VS:Function Reference|Function Reference
..VS:Function_Reference_Appendix|Appendix
Description
Procedure CreateText creates a new text object in a VectorWorks document. The text object is created using the current pen position and default attributes.
PROCEDURE CreateText(
theText :DYNARRAY[] of CHAR);
def vs.CreateText(theText):
return None
Parameters
theText | | DYNARRAY[] of CHAR | | Text string. |
Remarks
_c_, 2015.12.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".
PushAttrs;
NameClass(ClassList(1));
PenPat(1);
FillPat(0);
PenFore(0, 0, 0);
TextSize(9); { avoid accidental small text size rising the error "An incorrect object is described" }
CreateText('Text');
PopAttrs;
Example
VectorScript
PROCEDURE Example;
VAR
Txt :ARRAY [1..100] of STRING;
Outpt :DYNARRAY[] of CHAR;
i :INTEGER;
BEGIN
FOR i := 1 TO 5 DO txt[i] := 'asdf';
i := 2;
Outpt := Txt[1];
WHILE Txt[i] <> '' DO BEGIN
OutPt := Concat(Outpt, Chr(13), Txt[i]);
i := i + 1;
END;
Layer('Text');
CreateText(Outpt);
Layer('Layer-1');
END;
RUN(Example);
Python
def Example():
txt = []
for i in range(0,4):
txt.append('asdf')
txt.append("")
i = 1
Outpt = txt[0]
while txt[i] != "":
OutPt = vs.Concat(Outpt, vs.Chr(13), txt[i])
i = i + 1
vs.Layer('Text')
vs.CreateText(Outpt)
vs.Layer('Layer-1')
Example()
Version
Availability: from VectorWorks 8.0
See Also
VS Functions:
VS:BeginText
| VS:EndText
VS Functions:
[[VS:BeginText]]
| [[VS:EndText]]