Text fields

Text fields are a feature for text and leaders. Text fields are formulas that are evaluated while Rhino is running and the result is displayed in the text. All text fields are in the syntax of %<field and options>%. When a formula cannot be evaluated an error string of #### is displayed.

Functions

Area

Calculates the area of a closed curve, hatch, surface, polysurface, or mesh.

Syntax:

%<Area("ObjectID")>%

AttributeUserText

Usertext for a given object / key combination.

Syntax:

%<UserText("ObjectID","Key")>%

Key of the UserText to retrieve the value.

BlockInstanceCount

Display the number of blocks of the specified name.

Syntax:

%<BlockInstanceCount("BlockName")>%

CurveLength

Length of a curve.

Syntax:

%<CurveLength("ObjectID")>%

Date

Current date.

Syntax:

%<Date("Format")>%

Text string examples

The date format can be any of the following strings:

%<date("d")>% = 08/17/2000

%<date("D")>% = Thursday, August 17, 2000

%<date("f")>% = Thursday, August 17, 2000 16:32

%<date("F")>% = Thursday, August 17, 2000 16:32:32

%<date("g")>% = 08/17/2000 16:32

%<date("G")>% = 08/17/2000 16:32:32

%<date("m")>% = August 17

%<date("r")>% = Thu, 17 Aug 2000 23:32:32 GMT

%<date("s")>% = 2000-08-17T16:32:32

%<date("t")>% = 16:32

%<date("T")>% = 16:32:32

%<date("dddd, MMMM dd yyyy")>% = Thursday, August 17 2000

%<date("ddd, MMM d 'yy")>% = Thu, Aug 17 '00

%<date("dddd, MMMM dd")>% = Thursday, August 17

%<date("M/yy")>% = 8/00

%<date("dd-MM-yy")>% = 17-08-00

DateModified

Date this file was last saved.

Syntax:

%<DetailScale("DetailID","Format")>%

DocumentUserText

Document user text in the model.

Syntax:

%<DocumentText("Key")>%

Key of the Document User Text to retrieve the value.

FileName

Path to the file.

Syntax:

%<FileName>%

%<FileName>% - creates the full path to the model

%<FileName("0")>% - creates the full path to the model

%<FileName("1")>% - short file name (includes file extension)

%<FileName("2")>% - full path to model without file extension

%<FileName("3")>% - short file name without extension

The number parameter is a mask to turn on certain features:

1 = short file name

2 = no extension

1+2 = 3 = short file name + no extension

ModelUnits

Current model unit.

Syntax:

%<ModelUnits>%

Notes

Contents of the Notes.

Syntax:

%<Notes>%

NumPages

Number of layout pages in the document.

Syntax:

%<NumPages>%

ObjectName

Display the object or block name if there is one.

Syntax:

%<ObjectName("ObjectID")>%

PageName

Current layout page name.

Syntax:

%<PageName>%

 

PageNumber

Current layout number.

Syntax:

%<PageNumber>%

 

 

 

 

Rhinoceros 6 © 2010-2020 Robert McNeel & Associates. 13-Oct-2020