BeginText Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   BeginText
;

Python:

def  vs.BeginText():
   return None

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.

説明

文字図形の作成を開始します。BeginTextとEndTextの間に文字列を設定します。

Example:

{ Create a multiple line text object at 0,0 }
TextFont(GetFontID('Monaco'));
TextSize(24);
TextOrigin(0,0);
BeginText;
'This multiple line text block 
is in 24pt Monaco and was created
by a VectorScript.'
EndText;



  CreateText Objects - Text 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   CreateText
( theText:DYNARRAY[] of CHAR ) ;

Python:

def  vs.CreateText(theText):
   return None

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.

説明

現在のペン位置に文字図形を作成します。

Parameters:

theText Text string. 文字列

Example:

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);

See Also:

BeginText   EndText  



  CreateTextStyleRes Objects - Text 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   CreateTextStyleRes
( name:STRING ) :HANDLE ;

Python:

def  vs.CreateTextStyleRes(name):
   return HANDLE

Description:

Creates a new text style resource with the specified name. A handle to the new resource is returned. Once the resource is created the attributes of the text style resource should be set appropriately.

説明

指定した名前で新規に文字スタイルを作成します。 作成したリソースへのハンドルを返します。 リソース作成後、各属性を適切に設定する必要があります。

Parameters:

name The name for the new text style. 文字スタイルの名前

Result:

A handle to the newly created text style resource will be returned.

返り値

作成した文字スタイルのリソースのハンドルを返します。



  EndText Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   EndText
;

Python:

def  vs.EndText():
   return None

Description:

Procedure EndText completes creation of a new text object.

説明

文字図形の作成を終了します。

See Also:

BeginText   CreateText  



  GetCharColor Objects - Text 
Vectorworks 2016

VectorScript Declaration:

PROCEDURE   GetCharColor
(   theText :HANDLE;
    position :INTEGER;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.GetCharColor(theText, position):
   return (red, green, blue)

Description:

Function GetCharColor returns the color of a character at a specified position in the given text object.
The position is in a range between 0 and 32767, representing a character position in the text string. An index of 0 refers to the first character in the string.

説明

任意の文字図形の、指定した位置にある文字の色を返します。

Parameters:

theText Handle of the text object 文字図形のハンドル
position Position of the character in the text string (0-based) 文字の位置(0を基準)



  GetFontID Objects - Text 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   GetFontID
( fontName:STRING ) :INTEGER ;

Python:

def  vs.GetFontID(fontName):
   return INTEGER

Description:

Function GetFontID converts the string name of an available font to a font ID which can be passed to other VectorScript routines.

説明

フォントの番号を返します。

Parameters:

fontName Name of installed font. フォントの名前

Example:

PROCEDURE Example;
VAR
	str :STRING;
BEGIN
	str := StrDialog('Enter the font name:', 'Arial');
	AlrtDialog(Concat('The font ID is: ', GetFontID(str)));
END;
RUN(Example);



  GetFontListSize Objects - Text 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   GetFontListSize
:INTEGER ;

Python:

def  vs.GetFontListSize():
   return INTEGER

Description:

Returns the number of available fonts on the local system.

説明

ローカルシステム上で利用可能なフォントの数を返します。

Example:

AlrtDialog(Concat('The number of available fonts is: ', GetFontListSize));



  GetFontName Objects - Text 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   GetFontName
( fontID:INTEGER ) :STRING ;

Python:

def  vs.GetFontName(fontID):
   return STRING

Description:

Function GetFontName converts a system font ID to a font name.

An integer ID with a value representing a font in the current operating system.

説明

フォントの名前を返します。

Parameters:

fontID Font ID value. フォントの番号

Example:

PROCEDURE Example;
VAR
	str :STRING;
	cnt :INTEGER;
BEGIN
	FOR cnt := 0 to 10 DO str := Concat(str, Chr(13), GetFontName(cnt));
	AlrtDialog(str);
END;
RUN(Example);



  GetText Objects - Text 
MiniCAD

VectorScript Declaration:

FUNCTION   GetText
( objectHd:HANDLE ) :DYNARRAY[] of CHAR ;

Python:

def  vs.GetText(objectHd):
   return DYNARRAY of CHAR

Description:

Function GetText returns the text contained within the referenced text object.

説明

ハンドルで指定した文字図形の文字列を返します。

Parameters:

objectHd Handle to text object. 文字図形のハンドル

返り値

文字列

See Also:

SetText  



  GetTextFont Objects - Text 
MiniCAD6.0

VectorScript Declaration:

FUNCTION   GetTextFont
(   objectHd :HANDLE;
    Position :INTEGER
) :INTEGER ;

Python:

def  vs.GetTextFont(objectHd, Position):
   return INTEGER

Description:

Procedure GetTextFont returns the font of the referenced text object at a specified position in the string.

The position is in a range between 0 and 32767, representing a character position in the text string. An index of 0 refers to the first character in the string.

説明

ハンドルで指定した文字図形の、指定した位置の文字のフォント番号を返します。

Parameters:

objectHd Handle to text object. 文字図形のハンドル
Position Position in text string. 文字の位置

返り値

フォント番号

Example:

fontID:=GetTextFont(handleToText,2);

See Also:

GetFontName   GetFontID  



  GetTextJust Objects - Text 
MiniCAD6.0

VectorScript Declaration:

FUNCTION   GetTextJust
( TextHd:HANDLE ) :INTEGER ;

Python:

def  vs.GetTextJust(TextHd):
   return INTEGER

Description:

Function GetTextJust returns the text justification of the referenced text object.

Table - Text Justification

Justification Constant
Left 1
Center 2
Right 3
Justify 4

説明

ハンドルで指定した文字図形の位置揃えを返します。

Parameters:

TextHd Handle to text object. 文字図形のハンドル

返り値

位置揃え



  GetTextLeading Objects - Text 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   GetTextLeading
( theText:HANDLE ) :REAL ;

Python:

def  vs.GetTextLeading(theText):
   return REAL

Description:

Procedure GetTextLeading returns the custom leading value(in points) of the referenced text object.

説明

ハンドルで指定した文字図形の行間隔を返します。

Parameters:

theText Handle to text object. 文字図形のハンドル

返り値

行間隔



  GetTextLength Objects - Text 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   GetTextLength
( TextHd:HANDLE ) :INTEGER ;

Python:

def  vs.GetTextLength(TextHd):
   return INTEGER

Description:

GetTextLength returns the string length of the referenced text object.

説明

ハンドルで指定した文字図形の文字の数を返します。

Parameters:

TextHd Handle to text object. 文字図形のハンドル

返り値

文字数



  GetTextOrientation Objects - Text 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   GetTextOrientation
(   theText :HANDLE;
  VAR  textOriginX :REAL;
  VAR  textOriginY :REAL;
  VAR  textAng :REAL;
  VAR  textIsMirrored :BOOLEAN
) ;

Python:

def  vs.GetTextOrientation(theText):
   return (textOrigin, textAng, textIsMirrored)

Description:

Procedure GetTextOrientation returns the position and orientation attributes of the referenced text object.

説明

ハンドルで指定した文字図形の座標と角度を返します。

Parameters:

theText Handle to text object. 文字図形のハンドル
textOrigin Returns coordinates of text origin. 座標
textAng Returns rotation angle of text. 角度
textIsMirrored Returns mirror state of text. 反転している時はTRUE

Example:

PROCEDURE Example;
VAR
   theText :HANDLE;
   textOriginX, textOriginY, textAng :REAL;
   textIsMirrored :BOOLEAN;
BEGIN
   theText := FSActLayer;
   GetTextOrientation(theText, textOriginX, textOriginY, textAng, textIsMirrored);
   Locus(textOriginX, textOriginY);
END;
RUN(Example);



  GetTextSize Objects - Text 
MiniCAD6.0

VectorScript Declaration:

FUNCTION   GetTextSize
(   TextHd :HANDLE;
    Position :INTEGER
) :REAL ;

Python:

def  vs.GetTextSize(TextHd, Position):
   return REAL

Description:

Procedure GetTextSize returns the text point size at a specified position within the referenced text object. 1 point = 1/72".

The position is in a range between 0 and 32767, representing a character position in the text string. An index of 0 refers to the first character in the string.

説明

ハンドルで指定した文字図形の、指定した位置の文字の大きさを返します。

Parameters:

TextHd Handle to text object. 文字図形のハンドル
Position Position in text string. 文字の位置

返り値

文字の大きさ



  GetTextSpace Objects - Text 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   GetTextSpace
( theText:HANDLE ) :INTEGER ;

Python:

def  vs.GetTextSpace(theText):
   return INTEGER

Description:

Procedure GetTextSpace returns the line spacing of the referenced text object.

Table - Text Spacing

Leading Constant
Single space 2
1 1/2 space 3
Double space 4

説明

ハンドルで指定した文字図形の行間隔を返します。

Parameters:

theText Handle to text object. 文字図形のハンドル

返り値

行間隔



  GetTextStyle Objects - Text 
MiniCAD6.0

VectorScript Declaration:

FUNCTION   GetTextStyle
(   TextHd :HANDLE;
    Position :INTEGER
) :INTEGER ;

Python:

def  vs.GetTextStyle(TextHd, Position):
   return INTEGER

Description:

Procedure GetTextStyle returns the text style at a specified position within the referenced text object.

The position is in a range between 0 and 32767, representing a character position in the text string. An index of 0 refers to the first character in the string.

Table - Text Style

Style Constant
Plain 0
Bold 1
Italic 2
Underline 4
Outline 8
Shadowed 16
Superscript 32
Subscript 64

説明

ハンドルで指定した文字図形の、指定した位置の文字のスタイルを返します。指定した位置に文字が存在しない場合は0が返ります。

Parameters:

TextHd Handle to text object. 文字図形のハンドル
Position Position in text string. 文字の位置

返り値

文字のスタイル



  GetTextStyleRef Objects - Text 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   GetTextStyleRef
( objectId:HANDLE ) :LONGINT ;

Python:

def  vs.GetTextStyleRef(objectId):
   return LONGINT

Description:

Function GetTextStyleRef returns the text style for the referenced object. The integer returned is the internal index of the text style used by this object.

If the text object is using class text style, this returns the effective style. You should use the *TextStyleByClass* functions to check and preserve by-class behavior.

説明

指定した図形の文字スタイルのインデックスを返します。

対象の図形がクラスの文字スタイルを使用している場合、クラスに設定されているスタイルを返します。

Parameters:

objectId handle to object 図形のハンドル

See Also:

SetTextStyleRef   GetTextStyleRef   SetTextStyleRefN   GetTextStyleRefN   SetTextStyleByClass   SetTextStyleByClassN   IsTextStyleByClass   IsTextStyleByClassN  



  GetTextStyleRefN Objects - Text 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   GetTextStyleRefN
(   objectId :HANDLE;
    position :INTEGER
) :LONGINT ;

Python:

def  vs.GetTextStyleRefN(objectId, position):
   return LONGINT

Description:

GetTextStyleRefN returns the text style reference at a specified position within the text object. Reference 0 means Un-Styled.

If the text object is using class text style, this returns the effective style. You should use the *TextStyleByClass* functions to check and preserve by-class behavior.

説明

文字図形のうち指定した位置の文字の文字スタイルのインデックスを返します。 文字スタイルが使用されていない場合は 0 を返します。

文字図形がクラスの文字スタイルを使用している場合、クラスに設定されているスタイルを返します。

Parameters:

objectId handle to text object 図形のハンドル
position Position in text string, zero-based. 文字の位置(0を基準)

Result:

Returns the text style reference id for the requested character postion

返り値

指定した文字の文字スタイルのインデックスを返します。

See Also:

SetTextStyleRef   GetTextStyleRef   SetTextStyleRefN   GetTextStyleRefN   SetTextStyleByClass   SetTextStyleByClassN   IsTextStyleByClass   IsTextStyleByClassN  



  GetTextVerticalAlign Objects - Text 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   GetTextVerticalAlign
( TextHd:HANDLE ) :INTEGER ;

Python:

def  vs.GetTextVerticalAlign(TextHd):
   return INTEGER

Description:

Function GetTextVerticalAlign returns the vertical alignment of the referenced text object.

Table - Text Vertical Justification

Justification Constant
Top of text box 1
Top baseline 2
Text centerline 3
Bottom baseline 4
Bottom of text box 5

説明

ハンドルで指定した文字図形の垂直方向の位置揃えを返します。

Parameters:

TextHd Handle to text object. 文字図形のハンドル

返り値

垂直方向の位置揃え



  GetTextWidth Objects - Text 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   GetTextWidth
( theText:HANDLE ) :REAL ;

Python:

def  vs.GetTextWidth(theText):
   return REAL

Description:

Procedure GetTextWidth returns the margin width of the referenced text object.

説明

ハンドルで指定した文字図形の幅を返します。

Parameters:

theText Handle to text object. 文字図形のハンドル

返り値

See Also:

SetTextWidth  



  GetTextWrap Objects - Text 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   GetTextWrap
( theText:HANDLE ) :BOOLEAN ;

Python:

def  vs.GetTextWrap(theText):
   return BOOLEAN

Description:

Procedure GetTextWrap returns the text wrap mode of the referenced text object.

説明

ハンドルで指定した文字図形でラップテキストが有効の場合はTRUEを返します。

Parameters:

theText Handle to text object. 文字図形のハンドル

返り値

ラップテキストが有効の時はTRUE



  IsTextStyleByClassN Objects - Text 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   IsTextStyleByClassN
(   objectId :HANDLE;
    position :INTEGER
) :BOOLEAN ;

Python:

def  vs.IsTextStyleByClassN(objectId, position):
   return BOOLEAN

Description:

IsTextStyleByClassN returns whether the class text style is used at a specified position within the text object.

説明

文字図形の文字列のうち指定した位置の文字がクラスの文字スタイルを使用しているかどうかを返します。

Parameters:

objectId handle to text object 図形のハンドル
position Position in text string, zero-based. 文字の位置(0を基準)

Result:

Returns True if the requested character postion uses the class text style

返り値

指定した文字がクラスの文字スタイルを使用しているかどうかを返します。

See Also:

SetTextStyleRef   GetTextStyleRef   SetTextStyleRefN   GetTextStyleRefN   SetTextStyleByClass   SetTextStyleByClassN   IsTextStyleByClass   IsTextStyleByClassN  



  SetText Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetText
(   objectHd :HANDLE;
    text :DYNARRAY[] of CHAR
) ;

Python:

def  vs.SetText(objectHd, text):
   return None

Description:

Procedure SetText sets the content of the referenced text object. The new text is assigned the font, size and style characteristics of the first character of the old text string.

説明

ハンドルで指定した文字図形の文字列を設定します。

Parameters:

objectHd Handle to text object. 文字図形のハンドル
text New text string value. 文字列

Example:

SetText(hText,'A new text string value');



  SetTextAdorner Objects - Text 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   SetTextAdorner
(   textBlock :HANDLE;
    textAdorner :HANDLE;
    pX :REAL;
    pY :REAL
) :Boolean ;

Python:

def  vs.SetTextAdorner(textBlock, textAdorner, p):
   return Boolean

Description:

This function creates a relationship between the specified text block and the text adorner such that when theText Block is scaled in a VP, the text adorner is also scaled. Several objects can be adorned to the same text object.

説明

この関数は、指定したテキストブロックとテキスト装飾の間の関係を作成します。
テキストブロックがVPにある場合、テキスト装飾も同様にVPに位置します。
同じテキスト図形に、複数のオブジェクトを装飾できます。

Parameters:

textBlock The Text object being adorned. テキスト図形のハンドル
textAdorner The object used to adorn the specified text. テキストを装飾する図形のハンドル
p The point by which texts will be scaled. テキストの位置

Result:

- 'true' if the operation was successful.
- 'false' otherwise.

返り値

成功したらTRUE、その他はFALSEを返します。

Example:

PROCEDURE Example;
VAR
theText      :HANDLE;
theShape : HANDLE;
restult :      BOOLEAN;
BEGIN
TextVerticalAlign(3);
TextJust(2);
MoveTo(0,0);
RectangleN(-.5",      -.5", 1, 0, 1", 1");
theShape :=      lNewObj;
CreateText('ID1');
theText :=      lNewObj;
restult :=      SetTextAdorner(theText,theShape,0,0);
END;
RUN(Example);



  SetTextFont Objects - Text 
MiniCAD6.0

VectorScript Declaration:

PROCEDURE   SetTextFont
(   objectHd :HANDLE;
    Start :INTEGER;
    Count :INTEGER;
    FontNum :INTEGER
) ;

Python:

def  vs.SetTextFont(objectHd, Start, Count, FontNum):
   return None

Description:

Procedure SetTextFont sets the font of a substring in the referenced text object.

説明

ハンドルで指定した文字図形の指定した位置から、指定した長さまでのフォントを設定します。

Parameters:

objectHd Handle to text object. 文字図形のハンドル
Start Start position in text string. 文字の位置
Count Length of substring. 文字の長さ
FontNum Font ID for substring. フォントの番号

Example:

SetTextFont(handleToText,0,5,GetFontID('Helvetica'));

{sets the first five characters of the referenced text string to Helvetica}

See Also:

GetFontID  



  SetTextJust Objects - Text 
MiniCAD6.0

VectorScript Declaration:

PROCEDURE   SetTextJust
(   TextHd :HANDLE;
    JustFlag :INTEGER
) ;

Python:

def  vs.SetTextJust(TextHd, JustFlag):
   return None

Description:

Procedure SetTextJust sets the text justification of the referenced text object.

Table - Text Justification

Justification Constant
Left 1
Center 2
Right 3
Justify 4

説明

ハンドルで指定した文字図形の位置揃えを設定します。

Parameters:

TextHd Handle to text object. 文字図形のハンドル
JustFlag Justification setting for text. 位置揃え

See Also:

SetTextJustN  



  SetTextJustN Objects - Text 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   SetTextJustN
(   TextHd :HANDLE;
    JustFlag :INTEGER
) ;

Python:

def  vs.SetTextJustN(TextHd, JustFlag):
   return None

Description:

Procedure SetTextJustN sets the text justification of the referenced text object without changing its location.

Table - Text Justification

Justification Constant
Left 1
Center 2
Right 3
Justify 4

説明

ハンドルで指定した文字図形の位置を変えずに位置揃えを設定します。

Parameters:

TextHd Handle to text object. 文字図形のハンドル
JustFlag Justification setting for text. 位置揃え

See Also:

SetTextJust  



  SetTextLeading Objects - Text 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetTextLeading
(   theText :HANDLE;
    leading :REAL
) ;

Python:

def  vs.SetTextLeading(theText, leading):
   return None

Description:

Procedure SetTextLeading sets the line spacing of the referenced text object to a custom leading value (in points).

説明

指定した文字図形の文字の行間隔を設定します。

Parameters:

theText Handle to text object. 文字図形のハンドル
leading Custom leading value for text. 行間隔



  SetTextOrientation Objects - Text 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetTextOrientation
(   theText :HANDLE;
    textOriginX :REAL;
    textOriginY :REAL;
    textAngle :REAL;
    textIsMirrored :BOOLEAN
) ;

Python:

def  vs.SetTextOrientation(theText, textOrigin, textAngle, textIsMirrored):
   return None

Description:

Procedure SetTextOrientation sets the position and orientation attributes of the referenced text object.

説明

指定した文字図形の座標と角度を設定します。

Parameters:

theText Handle to text object. 文字図形のハンドル
textOrigin Coordinates of text object origin. X、Y座標
textAngle Rotation angle for text object. 角度
textIsMirrored Mirroring setting for text object. 反転させる場合はTRUE

返り値

反転させる時はTRUE



  SetTextSize Objects - Text 
MiniCAD6.0

VectorScript Declaration:

PROCEDURE   SetTextSize
(   objectHd :HANDLE;
    Start :INTEGER;
    Count :INTEGER;
    Size :REAL
) ;

Python:

def  vs.SetTextSize(objectHd, Start, Count, Size):
   return None

Description:

Procedure SetTextSize sets the text size of a specified substring in the referenced text object. Parameters Start and Count specify the substring start position and substring length. Parameter Size specifies the size (in points) to be assigned to the substring.

説明

ハンドルで指定した文字図形の指定した位置から、指定した長さまでのフォントの大きさを設定します。

Parameters:

objectHd Handle to text object. 文字図形のハンドル
Start Start position in text string. 文字の位置
Count Length of substring. 文字の長さ
Size Text size setting for substring. 文字の大きさ

Example:

SetTextSize(HandleToText,0,5,24);
{set the first five characters of the referenced text string to 24 point text}



  SetTextSpace Objects - Text 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetTextSpace
(   theText :HANDLE;
    spacing :INTEGER
) ;

Python:

def  vs.SetTextSpace(theText, spacing):
   return None

Description:

Procedure SetTextSpace sets the line spacing of the referenced text object.

Table - Text Spacing

Leading Constant
Single space 2
1 1/2 space 3
Double space 4

説明

ハンドルで指定した文字図形の行間隔を設定します。

Parameters:

theText Handle to text object. 文字図形のハンドル
spacing Line spacing for text. 行間隔



  SetTextStyle Objects - Text 
MiniCAD6.0

VectorScript Declaration:

PROCEDURE   SetTextStyle
(   objectHd :HANDLE;
    Start :INTEGER;
    Count :INTEGER;
    Style :INTEGER
) ;

Python:

def  vs.SetTextStyle(objectHd, Start, Count, Style):
   return None

Description:

Procedure SetTextStyle sets the text style of a specified substring in the referenced text object.

Table - Text Style

Style Constant
Plain 0
Bold 1
Italic 2
Underline 4
Outline 8
Shadowed 16
Superscript 32
Subscript 64

説明

ハンドルで指定した文字図形の指定した位置から、指定した長さまでのフォントのスタイルを設定します。

Parameters:

objectHd Handle to text object. 文字図形のハンドル
Start Start position in text string. 文字の位置
Count Length of substring. 文字の長さ
Style Text style setting for substring. 文字のスタイル

Example:

SetTextSyle(HandleToText,0,5,34);

{set the style of the substring text to bold and shadowed}



  SetTextStyleByClassN Objects - Text 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   SetTextStyleByClassN
(   objectId :HANDLE;
    start :INTEGER;
    count :INTEGER
) :BOOLEAN ;

Python:

def  vs.SetTextStyleByClassN(objectId, start, count):
   return BOOLEAN

Description:

SetTextStyleByClassN sets a specified substring of a text object to use the class text style. To undo this, use SetTextStyleRef or SetTextStyleRefN on the text.

説明

文字図形のうち指定した部分の文字列がクラスの文字スタイルを使用するように設定します。 設定を取り消すには、 SetTextStyleRef または SetTextStyleRefN を使用します。

Parameters:

objectId handle to text object 図形のハンドル
start Start position in text string, zero-based. 文字列の開始位置(0を基準)
count Length of substring. 文字列の長さ

Result:

Returns False if object is not a text object, or if part of the substring is past the end of existing text. Otherwise returns true.

返り値

図形が存在しないか、指定した文字列の位置が末尾を超えている場合FALSEを、それ以外はTRUEを返します。

See Also:

SetTextStyleRef   GetTextStyleRef   SetTextStyleRefN   GetTextStyleRefN   SetTextStyleByClass   SetTextStyleByClassN   IsTextStyleByClass   IsTextStyleByClassN  



  SetTextStyleRef Objects - Text 
Vectorworks 2015

VectorScript Declaration:

PROCEDURE   SetTextStyleRef
(   objectId :HANDLE;
    textStyleRef :LONGINT
) ;

Python:

def  vs.SetTextStyleRef(objectId, textStyleRef):
   return None

Description:

Procedure SetTextStyleRef sets the text style of an object to the referenced style. Reference 0 means Un-Styled. This procedure will replace by-class styling.

説明

図形がインデックスで指定した文字スタイルを使用するように設定します。 文字スタイルを使用しない(解除する)場合は0を指定します。

Parameters:

objectId handle to object 図形のハンドル
textStyleRef text style reference id 文字スタイルのインデックス

See Also:

SetTextStyleRef   GetTextStyleRef   SetTextStyleRefN   GetTextStyleRefN   SetTextStyleByClass   SetTextStyleByClassN   IsTextStyleByClass   IsTextStyleByClassN  



  SetTextStyleRefN Objects - Text 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   SetTextStyleRefN
(   objectId :HANDLE;
    start :INTEGER;
    count :INTEGER;
    textStyleRef :LONGINT
) :BOOLEAN ;

Python:

def  vs.SetTextStyleRefN(objectId, start, count, textStyleRef):
   return BOOLEAN

Description:

SetTextStyleRefN sets the text style of a specified substring of a text object to the referenced style. Reference 0 means Un-Styled. This procedure will replace by-class styling.

説明

文字図形のうち指定した部分の文字列がインデックスで指定した文字スタイルを使用するように設定します。文字スタイルを使用しない(解除する)場合は0を指定します。

Parameters:

objectId handle to text object 図形のハンドル
start Start position in text string, zero-based. 文字列の開始位置(0を基準)
count Length of substring. 文字列の長さ
textStyleRef text style reference id 文字スタイルのインデックス

Result:

Returns False if object is not a text object, or if part of the substring is past the end of existing text. Otherwise returns true.

返り値

図形が存在しないか、指定した文字列の位置が末尾を超えている場合FALSEを、それ以外はTRUEを返します。

See Also:

SetTextStyleRef   GetTextStyleRef   GetTextStyleRefN   SetTextStyleByClass   SetTextStyleByClassN   IsTextStyleByClass   IsTextStyleByClassN  



  SetTextVertAlignN Objects - Text 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   SetTextVertAlignN
(   TextHd :HANDLE;
    verticalAlignment :INTEGER
) ;

Python:

def  vs.SetTextVertAlignN(TextHd, verticalAlignment):
   return None

Description:

Procedure SetTextVertAlignN sets the vertical alignment of the referenced text object without changing its location.

Table - Text Vertical Justification

Justification Constant
Top of text box 1
Top baseline 2
Text centerline 3
Bottom baseline 4
Bottom of text box 5


説明

ハンドルで指定した文字図形の位置を変えずに垂直方向の配置を設定します。

Parameters:

TextHd Handle to the text object. 文字図形のハンドル
verticalAlignment Vertical alignment setting for text. 垂直方向の位置揃え

See Also:

SetTextVerticalAlign  



  SetTextVerticalAlign Objects - Text 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetTextVerticalAlign
(   TextHd :HANDLE;
    verticalAlignment :INTEGER
) ;

Python:

def  vs.SetTextVerticalAlign(TextHd, verticalAlignment):
   return None

Description:

Procedure SetTextVerticalAlign sets the vertical alignment of the referenced text object.

Table - Text Vertical Justification

Justification Constant
Top of text box 1
Top baseline 2
Text centerline 3
Bottom baseline 4
Bottom of text box 5


説明

ハンドルで指定した文字図形の垂直方向の位置揃えを設定します。

Parameters:

TextHd Handle to text object. 文字図形のハンドル
verticalAlignment Vertical alignment setting for text. 垂直方向の位置揃え

See Also:

SetTextVertAlignN  



  SetTextWidth Objects - Text 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetTextWidth
(   theText :HANDLE;
    widthDistance :REAL (Coordinate)
) ;

Python:

def  vs.SetTextWidth(theText, widthDistance):
   return None

Description:

Procedure SetTextWidth Sets the text wrapping margin width of the referenced text object.

A call to SetTextWidth automatically activates text wrapping.

説明

ハンドルで指定した文字図形の幅を設定します。

Parameters:

theText Handle to text object. 文字図形のハンドル
widthDistance Text wrapping margin setting for text.

Example:

PROCEDURE Example;

FUNCTION IncreaseTextWidth(h :HANDLE) :BOOLEAN;
BEGIN
   SetTextWidth(h, GetTextWidth(h) * 1.2);
END;

BEGIN
   ForEachObjectInLayer(IncreaseTextWidth, 2, 0, 4);
END;
RUN(Example);

See Also:

GetTextWidth  



  SetTextWrap Objects - Text 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetTextWrap
(   theText :HANDLE;
    wrap :BOOLEAN
) ;

Python:

def  vs.SetTextWrap(theText, wrap):
   return None

Description:

Procedure SetTextWrap sets the text wrap mode of the referenced text object.

説明

ハンドルで指定した文字図形でラップテキストの有効/無効を設定します。

Parameters:

theText Handle to text object. 文字図形のハンドル
wrap Text wrap setting for text. ラップテキストを有効にする時はTRUE



  TextFace Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   TextFace
( s:TEXTSTYLE ) ;

Python:

def  vs.TextFace(s):
   return None

Description:

Procedure TextFace sets the active text style of a Vectorworks document.

The text style may be one or a combination of the available styles, and should be enclosed in brackets. To specify multiple styles, each style should be separated by a comma.

説明

文字のスタイルを設定します。複数組み合わせる場合は,でつなぎます。

Parameters:

s Style setting for document. 文字のスタイル

Example:

TextFace([Italic]);
{set the active text style to Italic}

TextFace([Bold,Outline]);
{set the active text style to bold outline}



  TextFlip Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   TextFlip
( FlipType:INTEGER ) ;

Python:

def  vs.TextFlip(FlipType):
   return None

Description:

Procedure TextFlip flips newly created text vertically or horizontally. Parameter FlipType specifies the flip effect to be applied to the text.

Table - Text Flip Style

Flip Style Constant
No reflection 0
Horizontal reflection thru origin 1
Vertical reflection thru origin 2

説明

以降に作成する文字を垂直か水平に反転します。

Parameters:

FlipType Text flip setting for text. 反転の種類

Example:

TextFlip(1);
CreateText('Sample text string');



  TextFont Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   TextFont
( fontID:INTEGER ) ;

Python:

def  vs.TextFont(fontID):
   return None

Description:

Procedure TextFont sets the active font for the document.

説明

ドキュメントのアクティブなフォントを番号で設定します。

Parameters:

fontID Font ID setting for document. フォント番号

Example:

TextFont(GetFontID('Times'));



  TextJust Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   TextJust
( justify:INTEGER ) ;

Python:

def  vs.TextJust(justify):
   return None

Description:

Procedure TextJust sets the active text justification for a Vectorworks document.

Table - Text Justification

Justification Constant
Left 1
Center 2
Right 3
Justify 4

説明

文字の位置揃えを設定します。

Parameters:

justify Justification setting for document. 位置揃え



  TextLeading Objects - Text 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   TextLeading
( leading:REAL ) ;

Python:

def  vs.TextLeading(leading):
   return None

Description:

Procedure TextLeading sets the default line spacing of Vectorworks to a custom leading value (in points).

説明

文字の行間隔を設定します。

Parameters:

leading Custom leading value for document. 行間隔



  TextOrigin Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   TextOrigin
(   pX :REAL;
    pY :REAL
) ;

Python:

def  vs.TextOrigin(p):
   return None

Description:

Procedure TextOrigin is used to specify the origin point (location) of a newly created text object.

The position of the actual text with respect to the origin is determined by the current vertical and horizontal text justification modes.

説明

作成する文字図形の左上の座標を設定します。

Parameters:

p Coordinates of text origin. 文字位置の座標

See Also:

MoveTo  



  TextRotate Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   TextRotate
( Rotation:REAL ) ;

Python:

def  vs.TextRotate(Rotation):
   return None

Description:

Procedure TextRotate sets the angle of a new text object.

説明

以降に作成する文字を回転させます。

Parameters:

Rotation Rotation angle, in degrees, for text. 回転角度

Example:

TextRotate(45);
TextOrigin(0",0");
CreateText('Rotated string');



  TextSize Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   TextSize
( size:REAL ) ;

Python:

def  vs.TextSize(size):
   return None

Description:

Procedure TextSize sets the active text size of a Vectorworks document.

Text size is specified in points (1 point = 1/72"). If 0 is specified, then the font size will default to 12 pt text.

説明

文字の大きさを設定します。

Parameters:

size Point size of text. 文字の大きさ

Example:

TextSize(18);
{set the active text size to 18 point}



  TextSpace Objects - Text 
MiniCAD

VectorScript Declaration:

PROCEDURE   TextSpace
( spacing:INTEGER ) ;

Python:

def  vs.TextSpace(spacing):
   return None

Description:

Procedure TextSpace sets the active spacing for a Vectorworks document.

Table - Text Spacing

Leading Constant
Single space 2
1 1/2 space 3
Double space 4

説明

文字の行間隔を設定します。

Parameters:

spacing Spacing style for text. 文字の行間隔

Example:

TextSpace(4);
{set the active leading to double space}



  TextVerticalAlign Objects - Text 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   TextVerticalAlign
( verticalAlignment:INTEGER ) ;

Python:

def  vs.TextVerticalAlign(verticalAlignment):
   return None

Description:

Procedure TextVerticalAlign sets the active text vertical alignment of a Vectorworks document.

Table - Text Vertical Justification

Justification Constant
Top of text box 1
Top baseline 2
Text centerline 3
Bottom baseline 4
Bottom of text box 5


説明

垂直方向の位置揃えを設定します。

Parameters:

verticalAlignment Vertical alignment setting for document. 垂直方向の位置揃え



  TrueTypeToPoly Objects - Text 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   TrueTypeToPoly
(   textHandle :HANDLE;
  VAR  polyGroupHandle :HANDLE
) :LONGINT ;

Python:

def  vs.TrueTypeToPoly(textHandle):
   return (LONGINT, polyGroupHandle)

Description:

TrueTypeToPoly converts handle to Text object into handle to Group of poly objects with similar shape.

説明

TrueTypeToPolyは文字列オブジェクトを似た形の多角形や曲線のグループに変換します。