DelRecord Database / Record 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   DelRecord
(   h :HANDLE;
    name :DYNARRAY[] of CHAR
) ;

Python:

def  vs.DelRecord(h, name):
   return None

Description:

Procedure DelRecord removes an attached record from the referenced object.

説明

ハンドルで指定した図形に連結されているレコードを削除します。

Parameters:

h Handle to object. 図形のハンドル
name Name of record to be removed. レコードの名前



  Field Database / Record 
MiniCAD

VectorScript Declaration:

PROCEDURE   Field
(   h :HANDLE;
    s1 :STRING;
    s2 :STRING;
    s3 :STRING
) ;

Python:

def  vs.Field(h, s1, s2, s3):
   return None

Description:

Obsolete.

説明

使用できなくなった関数/手続きです。

See Also:

SetRField  



  GetFldFlag Database / Record 
Vectorworks 2016

VectorScript Declaration:

FUNCTION   GetFldFlag
(   h :HANDLE;
    t :INTEGER
) :INTEGER ;

Python:

def  vs.GetFldFlag(h, t):
   return INTEGER

Description:

Returns a number indicating the accuracy flag of a specified field in the referenced record.

説明

指定したレコードの精度フラグを返します。

Parameters:

h Handle to record. レコードのハンドル
t Field index (range of 1 - n). レコードフィールド番号(1からnの範囲)

Example:

fieldType:=GetFldFlag(recordHandle,3);



  GetFldName Database / Record 
MiniCAD

VectorScript Declaration:

FUNCTION   GetFldName
(   h :HANDLE;
    index :INTEGER
) :STRING ;

Python:

def  vs.GetFldName(h, index):
   return STRING

Description:

Returns the name of the specified field in the referenced record.

説明

レコードフィールドの名前を返します。

Parameters:

h Handle to record. レコードのハンドル
index Number of field whose name will be returned (in a range of 1-n). レコードフィールド番号(1からnの範囲)

Example:

FName:=GetFldName(HandleToRecord,1);



  GetFldType Database / Record 
MiniCAD

VectorScript Declaration:

FUNCTION   GetFldType
(   h :HANDLE;
    t :INTEGER
) :INTEGER ;

Python:

def  vs.GetFldType(h, t):
   return INTEGER

Description:

Returns a constant indicating the data type of a specified field in the referenced record.

Please refer to the VectorScript Appendix for specific field data types and formatting.

For Plug-in Object Parameter Records, the field types are documented in the VectorScript Appendix.

説明

レコードフィールドの形式を返します。

Parameters:

h Handle to record. レコードのハンドル
t Field index (range of 1 - n). レコードフィールド番号(1からnの範囲)

Example:

fieldType:=GetFldType(recordHandle,3);



  GetParametricRecord Database / Record 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   GetParametricRecord
( h:HANDLE ) :HANDLE ;

Python:

def  vs.GetParametricRecord(h):
   return HANDLE

Description:

Returns the handle to the parametric record attached the referenced object.

Parametric record is a hidden record format containing the parameter values of the parametric object.
Only parametric objects have parametric records.

説明

参照された図形に添付されているパラメトリックレコードのハンドルを返します。

パラメトリックレコードはパラメトリック図形のパラメータを保持する隠しレコードです。
パラメトリック図形だけがパラメトリックレコードを持ちます。

Parameters:

h Handle to a parametric object パラメトリック図形へのハンドル

Result:

Returns a handle to the record, or NIL if the record doesn't exist (e.g. not a parametric object passed)

返り値

レコードへのハンドルを返します。レコードがない場合(パラメトリック図形以外が渡された場合など)はNILを返します。



  GetRecord Database / Record 
MiniCAD

VectorScript Declaration:

FUNCTION   GetRecord
(   h :HANDLE;
    cnt :INTEGER
) :HANDLE ;

Python:

def  vs.GetRecord(h, cnt):
   return HANDLE

Description:

Returns the handle to a specified record attached the referenced object.

説明

ハンドルで指定した図形に連結されているレコードのハンドルを返します。

Parameters:

h Handle to object. 図形のハンドル
cnt Index of attached record (in a range of 1 - n). レコードの番号(1からnの範囲)

Example:

handleToRecord := GetRecord(handleToObject,3);



  GetRField Database / Record 
VectorWorks8.5

VectorScript Declaration:

FUNCTION   GetRField
(   h :HANDLE;
    record :STRING;
    field :STRING
) :DYNARRAY[] of CHAR ;

Python:

def  vs.GetRField(h, record, field):
   return DYNARRAY of CHAR

Description:

Returns string description of a value in the specified record field.

説明

ハンドルで指定した図形に連結されたレコードフィールドの値を文字列で返します。

Parameters:

h Handle to object. 図形のハンドル
record Name of record format. レコードの名前
field Name of field to be queried. レコードフィールドの名前

Result:

Returns the field value as a variable length string.

返り値

レコードフィールドの値を文字列で返します。

Example:

PROCEDURE Example;

FUNCTION WriteFieldValues(h :HANDLE) :BOOLEAN;
VAR
   cnt     :INTEGER;
   recHand :HANDLE;
   recName :STRING;
   fldName :STRING;
BEGIN
   recName := GetName(GetRecord(h, NumRecords(h)));
   recHand := GetObject(recName);
   FOR cnt := 1 TO NumFields(recHand) DO BEGIN
      fldName := GetFldName(recHand, cnt);
      WriteLn(fldName, ': ', GetRField(h, recName, fldName));
   END;
END;

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



  GetRFieldOpt Database / Record 
Vectorworks 2021

VectorScript Declaration:

PROCEDURE   GetRFieldOpt
(   h :HANDLE;
    record :STRING;
    field :STRING;
  VAR  outIsEmpty :BOOLEAN;
  VAR  outIsDataLinked :BOOLEAN
) ;

Python:

def  vs.GetRFieldOpt(h, record, field):
   return (outIsEmpty, outIsDataLinked)

Description:

Get the options for a record field.

説明

指定したレコードフィールドのオプションを取得します。

Parameters:

h Handle to object. オブジェクトのハンドル
record Name of record format. レコードフォーマットの名前
field Name of field to be queried. レコードフィールドの名前
outIsEmpty Output the flag for empty value used by the Data Manager. データマネージャが使用する、empty値かどうかのフラグを返します。
outIsDataLinked Output the flag for data linked value used by the Data Manager. データマネージャが使用する、データがリンクしている値かどうかのフラグを返します。

See Also:

SetRFieldOpt   GetRField   SetRField  



  LinkText Database / Record 
MiniCAD

VectorScript Declaration:

PROCEDURE   LinkText
(   h :HANDLE;
    rec :DYNARRAY[] of CHAR;
    fld :DYNARRAY[] of CHAR
) ;

Python:

def  vs.LinkText(h, rec, fld):
   return None

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.

説明

ハンドルで指定した文字図形にレコードとレコードフィールドを連結させます。この機能は「文字をレコードに連結」メニューに相当し、シンボル内の文字の制御に使います。

Parameters:

h Handle to text object that will be linked to record. 文字のハンドル
rec Name of record that will be linked to text string. レコードの名前
fld Name of field that will be linked to text string. レコードフィールドの名前

Example:

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

See Also:

BeginSym   EndSym  



  NewField Database / Record 
MiniCAD

VectorScript Declaration:

PROCEDURE   NewField
(   recName :DYNARRAY[] of CHAR;
    fieldName :DYNARRAY[] of CHAR;
    fieldValue :DYNARRAY[] of CHAR;
    fType :INTEGER;
    fFlag :INTEGER
) ;

Python:

def  vs.NewField(recName, fieldName, fieldValue, fType, fFlag):
   return None

Description:

Creates a new field in a specified record format. If the record does not exist, a new one is created using the specified record name.

Please refer to the VectorScript Appendix for specific field data types and formatting.




説明

レコードに新しいレコードフィールドを追加します。指定した名前のレコードが存在しなければ、新しいレコードを作成します。

Parameters:

recName Name of record to which field will be added. レコードの名前
fieldName Name of new field. レコードフィールドの名前
fieldValue Default value for new field. レコードフィールドの初期値
fType Data type of new field. レコードフィールドの形式
fFlag Display style of field. レコードフィールドのフラグ

Example:

NewField('Part Info','Serial No.','A-0000',4,0);



  NumFields Database / Record 
MiniCAD

VectorScript Declaration:

FUNCTION   NumFields
( h:HANDLE ) :INTEGER ;

Python:

def  vs.NumFields(h):
   return INTEGER

Description:

Returns the number of fields in the referenced record.

説明

レコードフィールドの数を返します。

Parameters:

h Handle to record. レコードのハンドル

返り値

フィールドの数

Example:

totalFields:=NumFields(HandleToRecord);



  NumRecords Database / Record 
MiniCAD

VectorScript Declaration:

FUNCTION   NumRecords
( h:HANDLE ) :INTEGER ;

Python:

def  vs.NumRecords(h):
   return INTEGER

Description:

Returns the number of records attached to the referenced object.

説明

ハンドルで指定した図形に連結されているレコードの数を返します。

Parameters:

h Handle to object. 図形のハンドル

返り値

レコードの数

Example:

numAttached:=NumRecords(HandleToObject);



  PopupGetChoices Database / Record 
Vectorworks 2023

VectorScript Declaration:

PROCEDURE   PopupGetChoices
(   recName :DYNARRAY[] of CHAR;
    fieldName :DYNARRAY[] of CHAR;
  VAR  outNumValues :INTEGER;
  VAR  outPopUpValues :ARRAY
) ;

Python:

def  vs.PopupGetChoices(recName, fieldName):
   return (DYNARRAY of CHAR, outNumValues, outPopUpValues)

Parameters:

recName Name of record in which field is. フィールドが存在するレコードの名前
fieldName Name of field. フィールドの名前
outNumValues Return number of popup values. ポップアップ値の数を返します。
outPopUpValues Return popup values. ポップアップの値を返します。

Example:

PROCEDURE Example;

FUNCTION TestFunc(h :HANDLE) :BOOLEAN;
VAR
arrayText 		: ARRAY[1..3] OF STRING;
CurPopUpInfo 	: ARRAY[ 1..100 ] OF STRING;	
numPopUpValues 	: INTEGER;
i		: INTEGER;
BEGIN
	{create new record}
	NewField( 'Format-1', 'FieldNamePopUp', '22222', 17, 0 );

	arrayText[1] := '11111';
	arrayText[2] := '22222';
	arrayText[3] := '33333';
	
	{add new popup values to FieldNamePopUp}
	PopupSetChoices( 'Format-1', 'FieldNamePopUp', arrayText );

	{get popup values and print them}
	PopupGetChoices( 'Format-1', 'FieldNamePopUp', numPopUpValues, CurPopUpInfo );
	
	FOR i:=1 TO numPopUpValues DO
	BEGIN
		AlertInform ( CurPopUpInfo[ i ], '', FALSE );
	END;
	
	{clear popUp values}
	{NewField( 'Format-1', 'FieldNamePopUp', '22222', 17, 0 );}
END;

BEGIN
	ForEachObjectInLayer(TestFunc, 0, 0, 4);

END;
RUN(Example);



  PopupSetChoices Database / Record 
Vectorworks 2023

VectorScript Declaration:

PROCEDURE   PopupSetChoices
(   recName :DYNARRAY[] of CHAR;
    fieldName :DYNARRAY[] of CHAR;
    popUpValues :ARRAY
) ;

Python:

def  vs.PopupSetChoices(recName, fieldName, popUpValues):
   return None

Parameters:

recName Name of record to which field will be added. フィールドが追加されるレコードの名前
fieldName Name of field. フィールドの名前
popUpValues Enter popup values. ポップアップの値を入力します。

Example:

PROCEDURE Example;

FUNCTION TestFunc(h :HANDLE) :BOOLEAN;
VAR
arrayText 		: ARRAY[1..3] OF STRING;
CurPopUpInfo 	: ARRAY[ 1..100 ] OF STRING;	
numPopUpValues 	: INTEGER;
i		: INTEGER;
BEGIN
	{create new record}
	NewField( 'Format-1', 'FieldNamePopUp', '22222', 17, 0 );

	arrayText[1] := '11111';
	arrayText[2] := '22222';
	arrayText[3] := '33333';
	
	{add new popup values to FieldNamePopUp}
	PopupSetChoices( 'Format-1', 'FieldNamePopUp', arrayText );

	{get popup values and print them}
	PopupGetChoices( 'Format-1', 'FieldNamePopUp', numPopUpValues, CurPopUpInfo );
	
	FOR i:=1 TO numPopUpValues DO
	BEGIN
		AlertInform ( CurPopUpInfo[ i ], '', FALSE );
	END;
	
	{clear popUp values}
	{NewField( 'Format-1', 'FieldNamePopUp', '22222', 17, 0 );}
END;

BEGIN
	ForEachObjectInLayer(TestFunc, 0, 0, 4);

END;
RUN(Example);



  Record Database / Record 
MiniCAD

VectorScript Declaration:

PROCEDURE   Record
(   h :HANDLE;
    s :DYNARRAY[] of CHAR
) ;

Python:

def  vs.Record(h, s):
   return None

Description:

Replaces an existing record with a new version of the same record. Parameter s specifies the record to be updated.

説明

ハンドルで指定した図形にレコードを連結し直します。

Parameters:

h Handle to object. 図形のハンドル
s Name of record to be updated. レコードの名前

Example:

Record(handleToObj,'Vendor Information');



  SetRecord Database / Record 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetRecord
(   h :HANDLE;
    record :DYNARRAY[] of CHAR
) ;

Python:

def  vs.SetRecord(h, record):
   return None

Description:

Assigns an instance of an existing record format to the referenced object .

説明

ハンドルで指定した図形にレコードを連結します。

Parameters:

h Handle to object. 図形のハンドル
record Name of record to assign to object. レコードの名前

Example:

SetRecord(HandleToObject,'Part Info');



  SetRField Database / Record 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetRField
(   h :HANDLE;
    record :DYNARRAY[] of CHAR;
    field :DYNARRAY[] of CHAR;
    value :DYNARRAY[] of CHAR
) ;

Python:

def  vs.SetRField(h, record, field, value):
   return None

Description:

Assigns a new value to an existing field of a record attached to the referenced object.

説明

ハンドルで指定した図形に連結しているレコードフィールドに値を設定します。

Parameters:

h Handle to a object with an attached record. 図形のハンドル
record Name of record to be updated. レコードの名前
field Name of field to be updated. レコードフィールドの名前
value New value for field.

Example:

SetRField(HandleToObject,'Part Info','Serial No.','P-4322');



  SetRFieldOpt Database / Record 
Vectorworks 2021

VectorScript Declaration:

PROCEDURE   SetRFieldOpt
(   h :HANDLE;
    record :STRING;
    field :STRING;
    isEmpty :BOOLEAN;
    isDataLinked :BOOLEAN
) ;

Python:

def  vs.SetRFieldOpt(h, record, field, isEmpty, isDataLinked):
   return None

Description:

Set options for a record field.

説明

指定したレコードフィールドのオプションを取得します。

Parameters:

h Handle to a object with an attached record. オブジェクトのハンドル
record Name of record to be updated. レコードフォーマットの名前
field Name of field to be updated. レコードフィールドの名前
isEmpty Option to set, specifying this field as empty data for the Data Manager. データマネージャのempty値としてこのフィールドを指定するオプションです。
isDataLinked Option to set, specifying this field data linked for the Data Manager. データマネージャのデータがリンクしているフィールドとして指定するオプションです。

Example:

SetRField(HandleToObject,'Part Info','Serial No.',False, False);

See Also:

GetRFieldOpt   GetRField   SetRField