Box class

The Box class gives you access to define box cards in PRIMER. More...

The PRIMER JavaScript API provides many class constants, properties and methods. For Arup to be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:

Class functions

Member functions

Box constants

Name Description
Box.BOX Box is *DEFINE_BOX.
Box.BOX_ADAPTIVE Box is *DEFINE_BOX_ADAPTIVE.
Box.BOX_COARSEN Box is *DEFINE_BOX_COARSEN.
Box.BOX_DRAWBEAD Box is *DEFINE_BOX_DRAWBEAD.
Box.BOX_SPH Box is *DEFINE_BOX_SPH.

Box properties

Name Type Description
bid integer Box number. Also see the label property which is an alternative name for this.
brmax real Maximum mesh size in 3D tetrahedron adaptivity
brmin real Minimum mesh size in 3D tetrahedron adaptivity
cid integer Optional coordinate system ID for tubular drawbead
cx real X coordinate of offset vector to local origin
cy real Y coordinate of offset vector to local origin
cz real Z coordinate of offset vector to local origin
exists (read only) logical true if box exists, false if referred to but not defined.
heading string Box heading
idir integer Direction of tooling movement. 1: x-direction, 2: y-direction, 3: z-direction
iflag integer Element protection flag. 0: elements inside, 1: elements outside box cannot be coarsened.
include integer The Include file number that the box is in.
label integer Box number. Also see the bid property which is an alternative name for this.
lcid integer Load curve ID to describe motion value versus time
level integer Maximum number of refinement levels for elements contained in box
lidx integer Box movement in global X axis or by node. The ndid property is an alternative name for this.
lidy integer Box movement in global Y axis
lidz integer Box movement in global Z axis
local logical Turns _LOCAL on or off
model (read only) integer The Model number that the box is in.
ndid integer Box movement in global X axis or by node. The lidx property is an alternative name for this.
nid integer Referential nodal ID for vd = 2
option constant The box option. Can be Box.BOX, Box.BOX_ADAPTIVE, Box.BOX_COARSEN, Box.BOX_DRAWBEAD or Box.BOX_SPH.
pid_adaptive integer Part ID for Box.BOX_ADAPTIVE option
pid_drawbead integer Part ID of blank for Box.BOX_DRAWBEAD option
radius real Radius of tube centered around draw bead
sid integer Part set, part or node set defining the nodal points along draw bead
stype integer Set type for stype. 2: part set ID, 3: part ID, 4: node set ID
vd integer Velocity/Displacement flag. 0: velocity, 1: displacement, 2: referential node
vid integer Vector ID of DOF
xmn real Minimum X coordinate
xmx real Maximum X coordinate
xv real Local V vector X coordinate
xx real Local X vector X coordinate
ymn real Minimum Y coordinate
ymx real Maximum Y coordinate
yv real Local V vector Y coordinate
yx real Local X vector Y coordinate
zmn real Minimum Z coordinate
zmx real Maximum Z coordinate
zv real Local V vector Z coordinate
zx real Local X vector Z coordinate

Detailed Description

The Box class allows you to create, modify, edit and manipulate box cards. See the documentation below for more details.

Constructor

new Box(Model[Model], bid[integer], xmn[real], xmx[real], ymn[real], ymx[real], zmn[real], zmx[real], heading (optional)[string])

Description

Create a new Box object.

Arguments

  • Model (Model)

    Model that box will be created in

  • bid (integer)

    Box number

  • xmn (real)

    Minimum X coordinate

  • xmx (real)

    Maximum X coordinate

  • ymn (real)

    Minimum Y coordinate

  • ymx (real)

    Maximum Y coordinate

  • zmn (real)

    Minimum Z coordinate

  • zmx (real)

    Maximum Z coordinate

  • heading (optional) (string)

    Title for the box

    Returns

    Box object

    Return type

    Box

    Example

    To create a new box in model m with label 200

    var b = new Box(m, 200, 1.5, 2.5, 1.0, 4.5, -4.0, 3.0);

    Details of functions

    AssociateComment(Comment[Comment])

    Description

    Associates a comment with a box.

    Arguments

  • Comment (Comment)

    Comment that will be attached to the box

    Returns

    No return value

    Example

    To associate comment c to the box b:

    b.AssociateComment(c);


    Blank()

    Description

    Blanks the box

    Arguments

    No arguments

    Returns

    No return value

    Example

    To blank box b:

    b.Blank();


    BlankAll(Model[Model], redraw (optional)[boolean]) [static]

    Description

    Blanks all of the boxs in the model.

    Arguments

  • Model (Model)

    Model that all boxs will be blanked in

  • redraw (optional) (boolean)

    If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().

    Returns

    No return value

    Example

    To blank all of the boxs in model m:

    Box.BlankAll(m);


    BlankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]

    Description

    Blanks all of the flagged boxs in the model.

    Arguments

  • Model (Model)

    Model that all the flagged boxs will be blanked in

  • flag (Flag)

    Flag set on the boxs that you want to blank

  • redraw (optional) (boolean)

    If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().

    Returns

    No return value

    Example

    To blank all of the boxs in model m flagged with f:

    Box.BlankFlagged(m, f);


    Blanked()

    Description

    Checks if the box is blanked or not.

    Arguments

    No arguments

    Returns

    true if blanked, false if not.

    Return type

    Boolean

    Example

    To check if box b is blanked:

    if (b.Blanked() ) do_something...


    Browse(modal (optional)[boolean])

    Description

    Starts an edit panel in Browse mode.

    Arguments

  • modal (optional) (boolean)

    If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.

    Returns

    no return value

    Example

    To Browse box b:

    b.Browse();


    ClearFlag(flag[Flag])

    Description

    Clears a flag on the box.

    Arguments

  • flag (Flag)

    Flag to clear on the box

    Returns

    No return value

    Example

    To clear flag f for box b:

    b.ClearFlag(f);


    Copy(range (optional)[boolean])

    Description

    Copies the box. The target include of the copied box can be set using Options.copy_target_include.

    Arguments

  • range (optional) (boolean)

    If you want to keep the copied item in the range specified for the current include. Default value is false. To set current include, use Include.MakeCurrentLayer().

    Returns

    Box object

    Return type

    Box

    Example

    To copy box b into box z:

    var z = b.Copy();


    Create(Model[Model], modal (optional)[boolean]) [static]

    Description

    Starts an interactive editing panel to create a box

    Arguments

  • Model (Model)

    Model that the box will be created in.

  • modal (optional) (boolean)

    If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.

    Returns

    Box object (or null if not made).

    Return type

    Box

    Example

    To start creating a box in model m:

    var b = Box.Create(m);


    DetachComment(Comment[Comment])

    Description

    Detaches a comment from a box.

    Arguments

  • Comment (Comment)

    Comment that will be detached from the box

    Returns

    No return value

    Example

    To detach comment c from the box b:

    b.DetachComment(c);


    Edit(modal (optional)[boolean])

    Description

    Starts an interactive editing panel.

    Arguments

  • modal (optional) (boolean)

    If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.

    Returns

    no return value

    Example

    To Edit box b:

    b.Edit();


    Error(message[string], details (optional)[string])

    Description

    Adds an error for box. For more details on checking see the Check class.

    Arguments

  • message (string)

    The error message to give

  • details (optional) (string)

    An optional detailed error message

    Returns

    No return value

    Example

    To add an error message "My custom error" for box b:

    b.Error("My custom error");


    First(Model[Model]) [static]

    Description

    Returns the first box in the model.

    Arguments

  • Model (Model)

    Model to get first box in

    Returns

    Box object (or null if there are no boxs in the model).

    Return type

    Box

    Example

    To get the first box in model m:

    var b = Box.First(m);


    FirstFreeLabel(Model[Model], layer (optional)[Include number]) [static]

    Description

    Returns the first free box label in the model. Also see Box.LastFreeLabel(), Box.NextFreeLabel() and Model.FirstFreeItemLabel().

    Arguments

  • Model (Model)

    Model to get first free box label in

  • layer (optional) (Include number)

    Include file (0 for the main file) to search for labels in (Equivalent to First free in layer in editing panels). If omitted the whole model will be used (Equivalent to First free in editing panels).

    Returns

    Box label.

    Return type

    Number

    Example

    To get the first free box label in model m:

    var label = Box.FirstFreeLabel(m);


    FlagAll(Model[Model], flag[Flag]) [static]

    Description

    Flags all of the boxs in the model with a defined flag.

    Arguments

  • Model (Model)

    Model that all boxs will be flagged in

  • flag (Flag)

    Flag to set on the boxs

    Returns

    No return value

    Example

    To flag all of the boxs with flag f in model m:

    Box.FlagAll(m, f);


    Flagged(flag[Flag])

    Description

    Checks if the box is flagged or not.

    Arguments

  • flag (Flag)

    Flag to test on the box

    Returns

    true if flagged, false if not.

    Return type

    Boolean

    Example

    To check if box b has flag f set on it:

    if (b.Flagged(f) ) do_something...


    ForEach(Model[Model], func[function], extra (optional)[any]) [static]

    Description

    Calls a function for each box in the model.
    Note that ForEach has been designed to make looping over boxs as fast as possible and so has some limitations.
    Firstly, a single temporary Box object is created and on each function call it is updated with the current box data. This means that you should not try to store the Box object for later use (e.g. in an array) as it is temporary.
    Secondly, you cannot create new boxs inside a ForEach loop.

    Arguments

  • Model (Model)

    Model that all boxs are in

  • func (function)

    Function to call for each box

  • extra (optional) (any)

    An optional extra object/array/string etc that will appended to arguments when calling the function

    Returns

    No return value

    Example

    To call function test for all of the boxs in model m:

    Box.ForEach(m, test);
    function test(b)
    {
    // b is Box object
    }

    To call function test for all of the boxs in model m with optional object:

    var data = { x:0, y:0 };
    Box.ForEach(m, test, data);
    function test(b, extra)
    {
    // b is Box object
    // extra is data
    }


    GetAll(Model[Model], property (optional)[string]) [static]

    Description

    Returns an array of Box objects or properties for all of the boxs in a model in PRIMER. If the optional property argument is not given then an array of Box objects is returned. If the property argument is given, that property value for each box is returned in the array instead of a Box object

    Arguments

  • Model (Model)

    Model to get boxs from

  • property (optional) (string)

    Name for property to get for all boxs in the model

    Returns

    Array of Box objects or properties

    Return type

    Array

    Example

    To make an array of Box objects for all of the boxs in model m:

    var a = Box.GetAll(m);

    To return an array containing the value of property 'foo' (for example 'x' for a node) for each box in model m:

    var a = Box.GetAll(m, 'foo');


    GetComments()

    Description

    Extracts the comments associated to a box.

    Arguments

    No arguments

    Returns

    Array of Comment objects (or null if there are no comments associated to the node).

    Return type

    Array

    Example

    To get the array of comments associated to the box b:

    var comm_array = b.GetComments();


    GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]

    Description

    Returns an array of Box objects for all of the flagged boxs in a model in PRIMER If the optional property argument is not given then an array of Box objects is returned. If the property argument is given, then that property value for each box is returned in the array instead of a Box object

    Arguments

  • Model (Model)

    Model to get boxs from

  • flag (Flag)

    Flag set on the boxs that you want to retrieve

  • property (optional) (string)

    Name for property to get for all flagged boxs in the model

    Returns

    Array of Box objects or properties

    Return type

    Array

    Example

    To make an array of Box objects for all of the boxs in model m flagged with f:

    var b = Box.GetFlagged(m, f);

    To return an array containing the value of property 'foo' (for example 'x' for a node) for all of the boxs in model m flagged with f:

    var a = Box.GetFlagged(m, f, 'foo');


    GetFromID(Model[Model], number[integer]) [static]

    Description

    Returns the Box object for a box ID.

    Arguments

  • Model (Model)

    Model to find the box in

  • number (integer)

    number of the box you want the Box object for

    Returns

    Box object (or null if box does not exist).

    Return type

    Box

    Example

    To get the Box object for box 100 in model m

    var b = Box.GetFromID(m, 100);


    GetParameter(prop[string])

    Description

    Checks if a Box property is a parameter or not. Note that object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. For this function to work the JavaScript interpreter must use the parameter name instead of the value. This can be done by setting the Options.property_parameter_names option to true before calling the function and then resetting it to false afterwards.. This behaviour can also temporarily be switched by using the Box.ViewParameters() method and 'method chaining' (see the examples below).

    Arguments

  • prop (string)

    box property to get parameter for

    Returns

    Parameter object if property is a parameter, null if not.

    Return type

    Parameter

    Example

    To check if Box property b.example is a parameter:

    Options.property_parameter_names = true;
    if (b.GetParameter(b.example) ) do_something...
    Options.property_parameter_names = false;

    To check if Box property b.example is a parameter by using the GetParameter method:

    if (b.ViewParameters().GetParameter(b.example) ) do_something...


    Keyword()

    Description

    Returns the keyword for this box (*DEFINE_BOX). Note that a carriage return is not added. See also Box.KeywordCards()

    Arguments

    No arguments

    Returns

    string containing the keyword.

    Return type

    String

    Example

    To get the keyword for box m:

    var key = m.Keyword();


    KeywordCards()

    Description

    Returns the keyword cards for the box. Note that a carriage return is not added. See also Box.Keyword()

    Arguments

    No arguments

    Returns

    string containing the cards.

    Return type

    String

    Example

    To get the cards for box b:

    var cards = b.KeywordCards();


    Last(Model[Model]) [static]

    Description

    Returns the last box in the model.

    Arguments

  • Model (Model)

    Model to get last box in

    Returns

    Box object (or null if there are no boxs in the model).

    Return type

    Box

    Example

    To get the last box in model m:

    var b = Box.Last(m);


    LastFreeLabel(Model[Model], layer (optional)[Include number]) [static]

    Description

    Returns the last free box label in the model. Also see Box.FirstFreeLabel(), Box.NextFreeLabel() and see Model.LastFreeItemLabel()

    Arguments

  • Model (Model)

    Model to get last free box label in

  • layer (optional) (Include number)

    Include file (0 for the main file) to search for labels in (Equivalent to Highest free in layer in editing panels). If omitted the whole model will be used.

    Returns

    Box label.

    Return type

    Number

    Example

    To get the last free box label in model m:

    var label = Box.LastFreeLabel(m);


    Next()

    Description

    Returns the next box in the model.

    Arguments

    No arguments

    Returns

    Box object (or null if there are no more boxs in the model).

    Return type

    Box

    Example

    To get the box in model m after box b:

    var b = b.Next();


    NextFreeLabel(Model[Model], layer (optional)[Include number]) [static]

    Description

    Returns the next free (highest+1) box label in the model. Also see Box.FirstFreeLabel(), Box.LastFreeLabel() and Model.NextFreeItemLabel()

    Arguments

  • Model (Model)

    Model to get next free box label in

  • layer (optional) (Include number)

    Include file (0 for the main file) to search for labels in (Equivalent to Highest+1 in layer in editing panels). If omitted the whole model will be used (Equivalent to Highest+1 in editing panels).

    Returns

    Box label.

    Return type

    Number

    Example

    To get the next free box label in model m:

    var label = Box.NextFreeLabel(m);


    Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]

    Description

    Allows the user to pick a box.

    Arguments

  • prompt (string)

    Text to display as a prompt to the user

  • limit (optional) (Model or Flag)

    If the argument is a Model then only boxs from that model can be picked. If the argument is a Flag then only boxs that are flagged with limit can be selected. If omitted, or null, any boxs from any model can be selected. from any model.

  • modal (optional) (boolean)

    If picking is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the pick will be modal.

  • button text (optional) (string)

    By default the window with the prompt will have a button labelled 'Cancel' which if pressed will cancel the pick and return null. If you want to change the text on the button use this argument. If omitted 'Cancel' will be used.

    Returns

    Box object (or null if not picked)

    Return type

    Box

    Example

    To pick a box from model m giving the prompt 'Pick box from screen':

    var b = Box.Pick('Pick box from screen', m);


    Previous()

    Description

    Returns the previous box in the model.

    Arguments

    No arguments

    Returns

    Box object (or null if there are no more boxs in the model).

    Return type

    Box

    Example

    To get the box in model m before box b:

    var b = b.Previous();


    RenumberAll(Model[Model], start[integer]) [static]

    Description

    Renumbers all of the boxs in the model.

    Arguments

  • Model (Model)

    Model that all boxs will be renumbered in

  • start (integer)

    Start point for renumbering

    Returns

    No return value

    Example

    To renumber all of the boxs in model m, from 1000000:

    Box.RenumberAll(m, 1000000);


    RenumberFlagged(Model[Model], flag[Flag], start[integer]) [static]

    Description

    Renumbers all of the flagged boxs in the model.

    Arguments

  • Model (Model)

    Model that all the flagged boxs will be renumbered in

  • flag (Flag)

    Flag set on the boxs that you want to renumber

  • start (integer)

    Start point for renumbering

    Returns

    No return value

    Example

    To renumber all of the boxs in model m flagged with f, from 1000000:

    Box.RenumberFlagged(m, f, 1000000);


    Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]

    Description

    Allows the user to select boxs using standard PRIMER object menus.

    Arguments

  • flag (Flag)

    Flag to use when selecting boxs

  • prompt (string)

    Text to display as a prompt to the user

  • limit (optional) (Model or Flag)

    If the argument is a Model then only boxs from that model can be selected. If the argument is a Flag then only boxs that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any boxs can be selected. from any model.

  • modal (optional) (boolean)

    If selection is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the selection will be modal.

    Returns

    Number of boxs selected or null if menu cancelled

    Return type

    Number

    Example

    To select boxs from model m, flagging those selected with flag f, giving the prompt 'Select boxs':

    Box.Select(f, 'Select boxs', m);

    To select boxs, flagging those selected with flag f but limiting selection to boxs flagged with flag l, giving the prompt 'Select boxs':

    Box.Select(f, 'Select boxs', l);


    SetFlag(flag[Flag])

    Description

    Sets a flag on the box.

    Arguments

  • flag (Flag)

    Flag to set on the box

    Returns

    No return value

    Example

    To set flag f for box b:

    b.SetFlag(f);


    Sketch(redraw (optional)[boolean])

    Description

    Sketches the box. The box will be sketched until you either call Box.Unsketch(), Box.UnsketchAll(), Model.UnsketchAll(), or delete the model

    Arguments

  • redraw (optional) (boolean)

    If model should be redrawn or not after the box is sketched. If omitted redraw is true. If you want to sketch several boxs and only redraw after the last one then use false for redraw and call View.Redraw().

    Returns

    No return value

    Example

    To sketch box b:

    b.Sketch();


    SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]

    Description

    Sketches all of the flagged boxs in the model. The boxs will be sketched until you either call Box.Unsketch(), Box.UnsketchFlagged(), Model.UnsketchAll(), or delete the model

    Arguments

  • Model (Model)

    Model that all the flagged boxs will be sketched in

  • flag (Flag)

    Flag set on the boxs that you want to sketch

  • redraw (optional) (boolean)

    If model should be redrawn or not after the boxs are sketched. If omitted redraw is true. If you want to sketch flagged boxs several times and only redraw after the last one then use false for redraw and call View.Redraw().

    Returns

    No return value

    Example

    To sketch all boxs flagged with flag in model m:

    Box.SketchFlagged(m, flag);


    Total(Model[Model], exists (optional)[boolean]) [static]

    Description

    Returns the total number of boxs in the model.

    Arguments

  • Model (Model)

    Model to get total for

  • exists (optional) (boolean)

    true if only existing boxs should be counted. If false or omitted referenced but undefined boxs will also be included in the total.

    Returns

    number of boxs

    Return type

    Number

    Example

    To get the total number of boxs in model m:

    var total = Box.Total(m);


    Unblank()

    Description

    Unblanks the box

    Arguments

    No arguments

    Returns

    No return value

    Example

    To unblank box b:

    b.Unblank();


    UnblankAll(Model[Model], redraw (optional)[boolean]) [static]

    Description

    Unblanks all of the boxs in the model.

    Arguments

  • Model (Model)

    Model that all boxs will be unblanked in

  • redraw (optional) (boolean)

    If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().

    Returns

    No return value

    Example

    To unblank all of the boxs in model m:

    Box.UnblankAll(m);


    UnblankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]

    Description

    Unblanks all of the flagged boxs in the model.

    Arguments

  • Model (Model)

    Model that the flagged boxs will be unblanked in

  • flag (Flag)

    Flag set on the boxs that you want to unblank

  • redraw (optional) (boolean)

    If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().

    Returns

    No return value

    Example

    To unblank all of the boxs in model m flagged with f:

    Box.UnblankFlagged(m, f);


    UnflagAll(Model[Model], flag[Flag]) [static]

    Description

    Unsets a defined flag on all of the boxs in the model.

    Arguments

  • Model (Model)

    Model that the defined flag for all boxs will be unset in

  • flag (Flag)

    Flag to unset on the boxs

    Returns

    No return value

    Example

    To unset the flag f on all the boxs in model m:

    Box.UnflagAll(m, f);


    Unsketch(redraw (optional)[boolean])

    Description

    Unsketches the box.

    Arguments

  • redraw (optional) (boolean)

    If model should be redrawn or not after the box is unsketched. If omitted redraw is true. If you want to unsketch several boxs and only redraw after the last one then use false for redraw and call View.Redraw().

    Returns

    No return value

    Example

    To unsketch box b:

    b.Unsketch();


    UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]

    Description

    Unsketches all boxs.

    Arguments

  • Model (Model)

    Model that all boxs will be unblanked in

  • redraw (optional) (boolean)

    If model should be redrawn or not after the boxs are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw().

    Returns

    No return value

    Example

    To unsketch all boxs in model m:

    Box.UnsketchAll(m);


    UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]

    Description

    Unsketches all flagged boxs in the model.

    Arguments

  • Model (Model)

    Model that all boxs will be unsketched in

  • flag (Flag)

    Flag set on the boxs that you want to unsketch

  • redraw (optional) (boolean)

    If model should be redrawn or not after the boxs are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw().

    Returns

    No return value

    Example

    To unsketch all boxs flagged with flag in model m:

    Box.UnsketchAll(m, flag);


    ViewParameters()

    Description

    Object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. This function temporarily changes the behaviour so that if a property is a parameter the parameter name is returned instead. This can be used with 'method chaining' (see the example below) to make sure a property argument is correct.

    Arguments

    No arguments

    Returns

    Box object.

    Return type

    Box

    Example

    To check if Box property b.example is a parameter by using the Box.GetParameter() method:

    if (b.ViewParameters().GetParameter(b.example) ) do_something...


    Warning(message[string], details (optional)[string])

    Description

    Adds a warning for box. For more details on checking see the Check class.

    Arguments

  • message (string)

    The warning message to give

  • details (optional) (string)

    An optional detailed warning message

    Returns

    No return value

    Example

    To add a warning message "My custom warning" for box b:

    b.Warning("My custom warning");


    Xrefs()

    Description

    Returns the cross references for this box.

    Arguments

    No arguments

    Returns

    Xrefs object.

    Return type

    Xrefs

    Example

    To get the cross references for box b:

    var xrefs = b.Xrefs();


    toString()

    Description

    Creates a string containing the box data in keyword format. Note that this contains the keyword header and the keyword cards. See also Box.Keyword() and Box.KeywordCards().

    Arguments

    No arguments

    Returns

    string

    Return type

    String

    Example

    To get data for box b in keyword format

    var s = b.toString();