Interpolation class

The Interpolation class gives you access to define *CONSTRAINED_INTERPOLATION 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

Interpolation constants

Name Description
Interpolation.NODE INID is a node.
Interpolation.NODE_SET INID is a node set.

Interpolation properties

Name Type Description
cidd integer Coordinate System ID if LOCAL option is active.
ddof integer Dependent Degrees-of-Freedom.
dnid integer Dependent Node id.
exists (read only) logical true if constrained interpolation exists, false if referred to but not defined.
fgm integer Flag for special treatment of this constraint for implicit problems only.
icid integer Interpolation label
include integer The Include file number that the constrained interpolation is in.
indsw integer Switch for controlling the explicit solution when an independent (or dependent) node is deleted.
ityp constant The Independent Node type. Can be Interpolation.NODE or Interpolation.NODE_SET.
local logical true if _LOCAL is set.
model (read only) integer The Model number that the constrained interpolation is in.
total (read only) integer Total number of INID fields in the keyword.

Detailed Description

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

Constructor

new Interpolation(Model[Model], icid[integer], dnid[integer], inid[integer], ddof (optional)[integer], local (optional)[boolean], cidd (optional)[integer], ityp (optional)[constant], idof (optional)[integer], twghtx (optional)[real], twghty (optional)[real], twghtz (optional)[real], rwghtx (optional)[real], rwghty (optional)[real], rwghtz (optional)[real], cidi (optional)[integer])

Description

Create a new Interpolation object.

Arguments

  • Model (Model)

    Model that Interpolation will be created in

  • icid (integer)

    Interpolation label

  • dnid (integer)

    Dependent Node id.

  • inid (integer)

    Independent Node or Node Set id.

  • ddof (optional) (integer)

    Dependent Degrees-of-Freedom. The default value is 123456.

  • local (optional) (boolean)

    true if _LOCAL is set.

  • cidd (optional) (integer)

    Coordinate System ID if LOCAL option is active. The default value is 0.

  • ityp (optional) (constant)

    The Independent Node type. Can be Interpolation.NODE or Interpolation.NODE_SET. The default value is Interpolation.NODE.

  • idof (optional) (integer)

    Independent Degrees-of-Freedom. The default value is 123456.

  • twghtx (optional) (real)

    Weighting factor for INID. Scales the x-translational component. The default value is 1.0.

  • twghty (optional) (real)

    Weighting factor for INID. Scales the y-translational component. The default value is twghtx.

  • twghtz (optional) (real)

    Weighting factor for INID. Scales the z-translational component. The default value is twghtx.

  • rwghtx (optional) (real)

    Weighting factor for INID. Scales the x-rotational component. The default value is twghtx.

  • rwghty (optional) (real)

    Weighting factor for INID. Scales the y-rotational component. The default value is twghtx.

  • rwghtz (optional) (real)

    Weighting factor for INID. Scales the z-rotational component. The default value is twghtx.

  • cidi (optional) (integer)

    Coordinate System ID if LOCAL option is active. The default value is 0

    Returns

    Interpolation object

    Return type

    Interpolation

    Example

    To create a new constrained interpolation in model m, of icid 2, dnid 12, inid 10, ddof 123, local true, cidd 22, ityp NODE_SET, idof 12, and twghtx 2.24.

    var c_i = new Interpolation(m,2,12,10,123,true,22,Interpolation.NODE_SET,12,2.24);

    Details of functions

    AddRowData(inid[integer], idof (optional)[integer], twghtx (optional)[real], twghty (optional)[real], twghtz (optional)[real], rwghtx (optional)[real], rwghty (optional)[real], rwghtz (optional)[real], cidi (optional)[integer])

    Description

    Used to add additional independent node card and local coordinate card (if ITYP is Interpolation.NODE_SET) to the keyword. Adds this data to the end of the selected *CONSTRAINED_INTERPOLATION

    Arguments

  • inid (integer)

    Independent Node or Node Set id.

  • idof (optional) (integer)

    Independent Degrees-of-Freedom. The default value is 123456.

  • twghtx (optional) (real)

    Weighting factor for INID. Scales the x-translational component. The default value is 1.0.

  • twghty (optional) (real)

    Weighting factor for INID. Scales the y-translational component. The default value is twghtx.

  • twghtz (optional) (real)

    Weighting factor for INID. Scales the z-translational component. The default value is twghtx.

  • rwghtx (optional) (real)

    Weighting factor for INID. Scales the x-rotational component. The default value is twghtx.

  • rwghty (optional) (real)

    Weighting factor for INID. Scales the y-rotational component. The default value is twghtx.

  • rwghtz (optional) (real)

    Weighting factor for INID. Scales the z-rotational component. The default value is twghtx.

  • cidi (optional) (integer)

    Coordinate System ID if LOCAL option is active. The default value is 0.

    Returns

    No return value

    Example

    To add INID 10 to the keyword c_i with idof 123, twghtx 1.2, twghty 2.2:

    c_i.AddRowData(10,123,1.2,2.2);


    AssociateComment(Comment[Comment])

    Description

    Associates a comment with a constrained interpolation.

    Arguments

  • Comment (Comment)

    Comment that will be attached to the constrained interpolation

    Returns

    No return value

    Example

    To associate comment c to the constrained interpolation c_i:

    c_i.AssociateComment(c);


    Blank()

    Description

    Blanks the constrained interpolation

    Arguments

    No arguments

    Returns

    No return value

    Example

    To blank constrained interpolation c_i:

    c_i.Blank();


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

    Description

    Blanks all of the constrained interpolations in the model.

    Arguments

  • Model (Model)

    Model that all constrained interpolations 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 constrained interpolations in model m:

    Interpolation.BlankAll(m);


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

    Description

    Blanks all of the flagged constrained interpolations in the model.

    Arguments

  • Model (Model)

    Model that all the flagged constrained interpolations will be blanked in

  • flag (Flag)

    Flag set on the constrained interpolations 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 constrained interpolations in model m flagged with f:

    Interpolation.BlankFlagged(m, f);


    Blanked()

    Description

    Checks if the constrained interpolation is blanked or not.

    Arguments

    No arguments

    Returns

    true if blanked, false if not.

    Return type

    Boolean

    Example

    To check if constrained interpolation c_i is blanked:

    if (c_i.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 constrained interpolation c_i:

    c_i.Browse();


    ClearFlag(flag[Flag])

    Description

    Clears a flag on the constrained interpolation.

    Arguments

  • flag (Flag)

    Flag to clear on the constrained interpolation

    Returns

    No return value

    Example

    To clear flag f for constrained interpolation c_i:

    c_i.ClearFlag(f);


    Copy(range (optional)[boolean])

    Description

    Copies the constrained interpolation. The target include of the copied constrained interpolation 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

    Interpolation object

    Return type

    Interpolation

    Example

    To copy constrained interpolation c_i into constrained interpolation z:

    var z = c_i.Copy();


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

    Description

    Starts an interactive editing panel to create a constrained interpolation

    Arguments

  • Model (Model)

    Model that the constrained interpolation 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

    Interpolation object (or null if not made).

    Return type

    Interpolation

    Example

    To start creating a constrained interpolation in model m:

    var c_i = Interpolation.Create(m);


    DetachComment(Comment[Comment])

    Description

    Detaches a comment from a constrained interpolation.

    Arguments

  • Comment (Comment)

    Comment that will be detached from the constrained interpolation

    Returns

    No return value

    Example

    To detach comment c from the constrained interpolation c_i:

    c_i.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 constrained interpolation c_i:

    c_i.Edit();


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

    Description

    Adds an error for constrained interpolation. 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 constrained interpolation c_i:

    c_i.Error("My custom error");


    First(Model[Model]) [static]

    Description

    Returns the first constrained interpolation in the model.

    Arguments

  • Model (Model)

    Model to get first constrained interpolation in

    Returns

    Interpolation object (or null if there are no constrained interpolations in the model).

    Return type

    Interpolation

    Example

    To get the first constrained interpolation in model m:

    var c_i = Interpolation.First(m);


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

    Description

    Returns the first free constrained interpolation label in the model. Also see Interpolation.LastFreeLabel(), Interpolation.NextFreeLabel() and Model.FirstFreeItemLabel().

    Arguments

  • Model (Model)

    Model to get first free constrained interpolation 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

    Interpolation label.

    Return type

    Number

    Example

    To get the first free constrained interpolation label in model m:

    var label = Interpolation.FirstFreeLabel(m);


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

    Description

    Flags all of the constrained interpolations in the model with a defined flag.

    Arguments

  • Model (Model)

    Model that all constrained interpolations will be flagged in

  • flag (Flag)

    Flag to set on the constrained interpolations

    Returns

    No return value

    Example

    To flag all of the constrained interpolations with flag f in model m:

    Interpolation.FlagAll(m, f);


    Flagged(flag[Flag])

    Description

    Checks if the constrained interpolation is flagged or not.

    Arguments

  • flag (Flag)

    Flag to test on the constrained interpolation

    Returns

    true if flagged, false if not.

    Return type

    Boolean

    Example

    To check if constrained interpolation c_i has flag f set on it:

    if (c_i.Flagged(f) ) do_something...


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

    Description

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

    Arguments

  • Model (Model)

    Model that all constrained interpolations are in

  • func (function)

    Function to call for each constrained interpolation

  • 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 constrained interpolations in model m:

    Interpolation.ForEach(m, test);
    function test(c_i)
    {
    // c_i is Interpolation object
    }

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

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


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

    Description

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

    Arguments

  • Model (Model)

    Model to get constrained interpolations from

  • property (optional) (string)

    Name for property to get for all constrained interpolations in the model

    Returns

    Array of Interpolation objects or properties

    Return type

    Array

    Example

    To make an array of Interpolation objects for all of the constrained interpolations in model m:

    var a = Interpolation.GetAll(m);

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

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


    GetComments()

    Description

    Extracts the comments associated to a constrained interpolation.

    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 constrained interpolation c_i:

    var comm_array = c_i.GetComments();


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

    Description

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

    Arguments

  • Model (Model)

    Model to get constrained interpolations from

  • flag (Flag)

    Flag set on the constrained interpolations that you want to retrieve

  • property (optional) (string)

    Name for property to get for all flagged constrained interpolations in the model

    Returns

    Array of Interpolation objects or properties

    Return type

    Array

    Example

    To make an array of Interpolation objects for all of the constrained interpolations in model m flagged with f:

    var c_i = Interpolation.GetFlagged(m, f);

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

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


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

    Description

    Returns the Interpolation object for a constrained interpolation ID.

    Arguments

  • Model (Model)

    Model to find the constrained interpolation in

  • number (integer)

    number of the constrained interpolation you want the Interpolation object for

    Returns

    Interpolation object (or null if constrained interpolation does not exist).

    Return type

    Interpolation

    Example

    To get the Interpolation object for constrained interpolation 100 in model m

    var c_i = Interpolation.GetFromID(m, 100);


    GetParameter(prop[string])

    Description

    Checks if a Interpolation 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 Interpolation.ViewParameters() method and 'method chaining' (see the examples below).

    Arguments

  • prop (string)

    constrained interpolation property to get parameter for

    Returns

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

    Return type

    Parameter

    Example

    To check if Interpolation property c_i.example is a parameter:

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

    To check if Interpolation property c_i.example is a parameter by using the GetParameter method:

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


    GetRowData(row_index[Integer])

    Description

    Returns independent node cards and local coordinate cards (if ITYP is Interpolation.NODE_SET) for the selected row of the *CONSTRAINED_INTERPOLATION.

    Arguments

  • row_index (Integer)

    The row index of the data to return. Note that indices start at 0, not 1.
    0 <= row_index < Interpolation.total

    Returns

    Array containing data.

    Return type

    Array

    Example

    To loop over all the lines of the keyword for c_i:

    for (i=0; i<c_i.total; i++)
            var data = c_i.GetRowData(i);
          


    Keyword()

    Description

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

    Arguments

    No arguments

    Returns

    string containing the keyword.

    Return type

    String

    Example

    To get the keyword for Interpolation c_i:

    var key = c_i.Keyword();


    KeywordCards()

    Description

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

    Arguments

    No arguments

    Returns

    string containing the cards.

    Return type

    String

    Example

    To get the cards for Interpolation c_i:

    var cards = c_i.KeywordCards();


    Last(Model[Model]) [static]

    Description

    Returns the last constrained interpolation in the model.

    Arguments

  • Model (Model)

    Model to get last constrained interpolation in

    Returns

    Interpolation object (or null if there are no constrained interpolations in the model).

    Return type

    Interpolation

    Example

    To get the last constrained interpolation in model m:

    var c_i = Interpolation.Last(m);


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

    Description

    Returns the last free constrained interpolation label in the model. Also see Interpolation.FirstFreeLabel(), Interpolation.NextFreeLabel() and see Model.LastFreeItemLabel()

    Arguments

  • Model (Model)

    Model to get last free constrained interpolation 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

    Interpolation label.

    Return type

    Number

    Example

    To get the last free constrained interpolation label in model m:

    var label = Interpolation.LastFreeLabel(m);


    Next()

    Description

    Returns the next constrained interpolation in the model.

    Arguments

    No arguments

    Returns

    Interpolation object (or null if there are no more constrained interpolations in the model).

    Return type

    Interpolation

    Example

    To get the constrained interpolation in model m after constrained interpolation c_i:

    var c_i = c_i.Next();


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

    Description

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

    Arguments

  • Model (Model)

    Model to get next free constrained interpolation 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

    Interpolation label.

    Return type

    Number

    Example

    To get the next free constrained interpolation label in model m:

    var label = Interpolation.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 constrained interpolation.

    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 constrained interpolations from that model can be picked. If the argument is a Flag then only constrained interpolations that are flagged with limit can be selected. If omitted, or null, any constrained interpolations 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

    Interpolation object (or null if not picked)

    Return type

    Interpolation

    Example

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

    var c_i = Interpolation.Pick('Pick constrained interpolation from screen', m);


    Previous()

    Description

    Returns the previous constrained interpolation in the model.

    Arguments

    No arguments

    Returns

    Interpolation object (or null if there are no more constrained interpolations in the model).

    Return type

    Interpolation

    Example

    To get the constrained interpolation in model m before constrained interpolation c_i:

    var c_i = c_i.Previous();


    RemoveRowData(row_index[Integer])

    Description

    Removes an independent node card and a local coordinate card (if ITYP is Interpolation.NODE_SET) for the selected row on the *CONSTRAINED_INTERPOLATION.

    Arguments

  • row_index (Integer)

    The row index of the data to return. Note that indices start at 0, not 1.
    0 <= row_index < Interpolation.total

    Returns

    No return value.

    Example

    To remove row 2 for c_i:

     c_i.RemoveRowData(1);


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

    Description

    Renumbers all of the constrained interpolations in the model.

    Arguments

  • Model (Model)

    Model that all constrained interpolations will be renumbered in

  • start (integer)

    Start point for renumbering

    Returns

    No return value

    Example

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

    Interpolation.RenumberAll(m, 1000000);


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

    Description

    Renumbers all of the flagged constrained interpolations in the model.

    Arguments

  • Model (Model)

    Model that all the flagged constrained interpolations will be renumbered in

  • flag (Flag)

    Flag set on the constrained interpolations that you want to renumber

  • start (integer)

    Start point for renumbering

    Returns

    No return value

    Example

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

    Interpolation.RenumberFlagged(m, f, 1000000);


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

    Description

    Allows the user to select constrained interpolations using standard PRIMER object menus.

    Arguments

  • flag (Flag)

    Flag to use when selecting constrained interpolations

  • prompt (string)

    Text to display as a prompt to the user

  • limit (optional) (Model or Flag)

    If the argument is a Model then only constrained interpolations from that model can be selected. If the argument is a Flag then only constrained interpolations that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any constrained interpolations 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 constrained interpolations selected or null if menu cancelled

    Return type

    Number

    Example

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

    Interpolation.Select(f, 'Select constrained interpolations', m);

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

    Interpolation.Select(f, 'Select constrained interpolations', l);


    SetFlag(flag[Flag])

    Description

    Sets a flag on the constrained interpolation.

    Arguments

  • flag (Flag)

    Flag to set on the constrained interpolation

    Returns

    No return value

    Example

    To set flag f for constrained interpolation c_i:

    c_i.SetFlag(f);


    SetRowData(row_index[Integer], inid[integer], idof (optional)[integer], twghtx (optional)[real], twghty (optional)[real], twghtz (optional)[real], rwghtx (optional)[real], rwghty (optional)[real], rwghtz (optional)[real], cidi (optional)[integer])

    Description

    Used to reset values in already existing independent node cards and local coordinate cards (if ITYP is Interpolation.NODE_SET) in the selected row of *CONSTRAINED_INTERPOLATION

    Arguments

  • row_index (Integer)

    The row index of the data to return. Note that indices start at 0, not 1.
    0 <= row_index < Interpolation.total

  • inid (integer)

    Independent Node or Node Set id.

  • idof (optional) (integer)

    Independent Degrees-of-Freedom. The default value is 123456.

  • twghtx (optional) (real)

    Weighting factor for INID. Scales the x-translational component. The default value is 1.0.

  • twghty (optional) (real)

    Weighting factor for INID. Scales the y-translational component. The default value is twghtx.

  • twghtz (optional) (real)

    Weighting factor for INID. Scales the z-translational component. The default value is twghtx.

  • rwghtx (optional) (real)

    Weighting factor for INID. Scales the x-rotational component. The default value is twghtx.

  • rwghty (optional) (real)

    Weighting factor for INID. Scales the y-rotational component. The default value is twghtx.

  • rwghtz (optional) (real)

    Weighting factor for INID. Scales the z-rotational component. The default value is twghtx.

  • cidi (optional) (integer)

    Coordinate System ID if LOCAL option is active. The default value is 0

    Returns

    No return value

    Example

    To reset the values of row 3 of the keyword with INID 11, idof 1234, twghtx 2.2, twghty 4.2:

    c_i.SetRowData(2,11,1234,2.2,4.2);


    Sketch(redraw (optional)[boolean])

    Description

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

    Arguments

  • redraw (optional) (boolean)

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

    Returns

    No return value

    Example

    To sketch constrained interpolation c_i:

    c_i.Sketch();


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

    Description

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

    Arguments

  • Model (Model)

    Model that all the flagged constrained interpolations will be sketched in

  • flag (Flag)

    Flag set on the constrained interpolations that you want to sketch

  • redraw (optional) (boolean)

    If model should be redrawn or not after the constrained interpolations are sketched. If omitted redraw is true. If you want to sketch flagged constrained interpolations 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 constrained interpolations flagged with flag in model m:

    Interpolation.SketchFlagged(m, flag);


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

    Description

    Returns the total number of constrained interpolations in the model.

    Arguments

  • Model (Model)

    Model to get total for

  • exists (optional) (boolean)

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

    Returns

    number of constrained interpolations

    Return type

    Number

    Example

    To get the total number of constrained interpolations in model m:

    var total = Interpolation.Total(m);


    Unblank()

    Description

    Unblanks the constrained interpolation

    Arguments

    No arguments

    Returns

    No return value

    Example

    To unblank constrained interpolation c_i:

    c_i.Unblank();


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

    Description

    Unblanks all of the constrained interpolations in the model.

    Arguments

  • Model (Model)

    Model that all constrained interpolations 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 constrained interpolations in model m:

    Interpolation.UnblankAll(m);


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

    Description

    Unblanks all of the flagged constrained interpolations in the model.

    Arguments

  • Model (Model)

    Model that the flagged constrained interpolations will be unblanked in

  • flag (Flag)

    Flag set on the constrained interpolations 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 constrained interpolations in model m flagged with f:

    Interpolation.UnblankFlagged(m, f);


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

    Description

    Unsets a defined flag on all of the constrained interpolations in the model.

    Arguments

  • Model (Model)

    Model that the defined flag for all constrained interpolations will be unset in

  • flag (Flag)

    Flag to unset on the constrained interpolations

    Returns

    No return value

    Example

    To unset the flag f on all the constrained interpolations in model m:

    Interpolation.UnflagAll(m, f);


    Unsketch(redraw (optional)[boolean])

    Description

    Unsketches the constrained interpolation.

    Arguments

  • redraw (optional) (boolean)

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

    Returns

    No return value

    Example

    To unsketch constrained interpolation c_i:

    c_i.Unsketch();


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

    Description

    Unsketches all constrained interpolations.

    Arguments

  • Model (Model)

    Model that all constrained interpolations will be unblanked in

  • redraw (optional) (boolean)

    If model should be redrawn or not after the constrained interpolations 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 constrained interpolations in model m:

    Interpolation.UnsketchAll(m);


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

    Description

    Unsketches all flagged constrained interpolations in the model.

    Arguments

  • Model (Model)

    Model that all constrained interpolations will be unsketched in

  • flag (Flag)

    Flag set on the constrained interpolations that you want to unsketch

  • redraw (optional) (boolean)

    If model should be redrawn or not after the constrained interpolations 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 constrained interpolations flagged with flag in model m:

    Interpolation.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

    Interpolation object.

    Return type

    Interpolation

    Example

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

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


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

    Description

    Adds a warning for constrained interpolation. 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 constrained interpolation c_i:

    c_i.Warning("My custom warning");


    Xrefs()

    Description

    Returns the cross references for this constrained interpolation.

    Arguments

    No arguments

    Returns

    Xrefs object.

    Return type

    Xrefs

    Example

    To get the cross references for constrained interpolation c_i:

    var xrefs = c_i.Xrefs();


    toString()

    Description

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

    Arguments

    No arguments

    Returns

    string

    Return type

    String

    Example

    To get data for Interpolation c_i in keyword format

    var s = c_i.toString();