Field Database / Record 

Declaration:

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

Description:

Obsolete.

See Also:

SetRField  



  GetFldName Database / Record 

Declaration:

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

Description:

Function GetFldName 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).

Example:

FName:=GetFldName(HandleToRecord,1);



  GetFldType Database / Record 

Declaration:

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

Description:

Function GetFldType returns a constant indicating the data type of a specified field in the referenced record.

Please refer to the VectorScript Appendix for specific tool ID values.

Parameters:

h Handle to record.
t Field index (range of 1 - n).

Example:

fieldType:=GetFldType(recordHandle,3);



  GetRecord Database / Record 

Declaration:

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

Description:

Function GetRecord 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).

Example:

handleToRecord:=GetRecord(handleToObject,3);



  LinkText Database / Record 

Declaration:

PROCEDURE   LinkText
(   h :HANDLE;
    rec :STRING;
    fld :STRING
) ;

Description:

Procedure LinkText 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 

Declaration:

PROCEDURE   NewField
(   recName :STRING;
    fieldName :STRING;
    fieldValue :STRING;
    fType :INTEGER;
    fFlag :INTEGER
) ;

Description:

Procedure NewField 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 tool ID values.

Please refer to the VectorScript Appendix for specific tool ID values.





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 

Declaration:

FUNCTION   NumFields
( h:HANDLE ) :INTEGER ;

Description:

Function NumFields returns the number of fields in the referenced record.

Example:

totalFields:=NumFields(HandleToRecord);



  NumRecords Database / Record 

Declaration:

FUNCTION   NumRecords
( h:HANDLE ) :INTEGER ;

Description:

Function NumRecords returns the number of records attached to the referenced object.

Parameters:

h Handle to object.

Example:

numAttached:=NumRecords(HandleToObject);



  Record Database / Record 

Declaration:

PROCEDURE   Record
(   h :HANDLE;
    s :STRING
) ;

Description:

Procedure Record 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 

Declaration:

PROCEDURE   SetRecord
(   h :HANDLE;
    record :STRING
) ;

Description:

Procedure SetRecord assigns a record to the referenced object in VectorWorks.

Parameters:

h Handle to object.
record Name of record to assign to object.

Example:

SetRecord(HandleToObject,'Part Info');



  SetRField Database / Record 

Declaration:

PROCEDURE   SetRField
(   h :HANDLE;
    record :STRING;
    field :STRING;
    value :STRING
) ;

Description:

Procedure SetRField assigns a new value to an existing field of a record attached to the referenced object.

Parameters:

h Handle to a Vectoworks 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');