Dummy class

The Dummy class gives you access to dummy 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

Dummy properties

Name Type Description
assemblies (read only) integer Number of assemblies defined.
exists (read only) logical true if dummy exists, false if referred to but not defined.
id (read only) integer Dummy number. Also see the label property which is an alternative name for this.
include integer The Include file number that the dummy is in.
label (read only) integer Dummy number. Also see the id property which is an alternative name for this.
model (read only) integer The Model number that the dummy is in.
points (read only) integer Number of reference points defined.
title string Dummy title.
xhpoint (read only) real H-Point X coordinate.
yhpoint (read only) real H-Point Y coordinate.
zhpoint (read only) real H-Point Z coordinate.

Detailed Description

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

Details of functions

AssociateComment(Comment[Comment])

Description

Associates a comment with a dummy.

Arguments

  • Comment (Comment)

    Comment that will be attached to the dummy

    Returns

    No return value

    Example

    To associate comment c to the dummy d:

    d.AssociateComment(c);


    Blank()

    Description

    Blanks the dummy

    Arguments

    No arguments

    Returns

    No return value

    Example

    To blank dummy d:

    d.Blank();


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

    Description

    Blanks all of the dummies in the model.

    Arguments

  • Model (Model)

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

    Dummy.BlankAll(m);


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

    Description

    Blanks all of the flagged dummies in the model.

    Arguments

  • Model (Model)

    Model that all the flagged dummies will be blanked in

  • flag (Flag)

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

    Dummy.BlankFlagged(m, f);


    Blanked()

    Description

    Checks if the dummy is blanked or not.

    Arguments

    No arguments

    Returns

    true if blanked, false if not.

    Return type

    Boolean

    Example

    To check if dummy d is blanked:

    if (d.Blanked() ) do_something...


    ClearFlag(flag[Flag])

    Description

    Clears a flag on the dummy.

    Arguments

  • flag (Flag)

    Flag to clear on the dummy

    Returns

    No return value

    Example

    To clear flag f for dummy d:

    d.ClearFlag(f);


    Copy(range (optional)[boolean])

    Description

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

    Dummy object

    Return type

    Dummy

    Example

    To copy dummy d into dummy z:

    var z = d.Copy();


    DetachComment(Comment[Comment])

    Description

    Detaches a comment from a dummy.

    Arguments

  • Comment (Comment)

    Comment that will be detached from the dummy

    Returns

    No return value

    Example

    To detach comment c from the dummy d:

    d.DetachComment(c);


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

    Description

    Adds an error for dummy. 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 dummy d:

    d.Error("My custom error");


    First(Model[Model]) [static]

    Description

    Returns the first dummy in the model.

    Arguments

  • Model (Model)

    Model to get first dummy in

    Returns

    Dummy object (or null if there are no dummies in the model).

    Return type

    Dummy

    Example

    To get the first dummy in model m:

    var d = Dummy.First(m);


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

    Description

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

    Arguments

  • Model (Model)

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

    Dummy label.

    Return type

    Number

    Example

    To get the first free dummy label in model m:

    var label = Dummy.FirstFreeLabel(m);


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

    Description

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

    Arguments

  • Model (Model)

    Model that all dummies will be flagged in

  • flag (Flag)

    Flag to set on the dummies

    Returns

    No return value

    Example

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

    Dummy.FlagAll(m, f);


    Flagged(flag[Flag])

    Description

    Checks if the dummy is flagged or not.

    Arguments

  • flag (Flag)

    Flag to test on the dummy

    Returns

    true if flagged, false if not.

    Return type

    Boolean

    Example

    To check if dummy d has flag f set on it:

    if (d.Flagged(f) ) do_something...


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

    Description

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

    Arguments

  • Model (Model)

    Model that all dummies are in

  • func (function)

    Function to call for each dummy

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

    Dummy.ForEach(m, test);
    function test(d)
    {
    // d is Dummy object
    }

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

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


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

    Description

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

    Arguments

  • Model (Model)

    Model to get dummies from

  • property (optional) (string)

    Name for property to get for all dummies in the model

    Returns

    Array of Dummy objects or properties

    Return type

    Array

    Example

    To make an array of Dummy objects for all of the dummies in model m:

    var a = Dummy.GetAll(m);

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

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


    GetAssembly(index[integer])

    Description

    Returns the information for an assembly

    Arguments

  • index (integer)

    The index of the assembly you want the coordinates for. Note that reference points start at 0, not 1. 0 <= index < assemblies

    Returns

    Object with the following properties:

    Name Type Description
    label integer Assembly label
    parent integer Parent assembly label
    title string Assembly title

    Return type

    object

    Example

    To get the information for the 3rd assembly for dummy d:

    var info = d.GetAssembly(2);


    GetAssemblyChildInfo(label[integer], index[integer])

    Description

    Get information about a child assembly from its parent assembly.

    Arguments

  • label (integer)

    The label of the parent assembly.

  • index (integer)

    index of the child (start with 0 till n-1, where n is total number of child).

    Returns

    Object with the following properties:

    Name Type Description
    dof_code integer Degree of freedom codes
    joint_stiff integer Constrained joint stiffness label
    label integer Label of the child assembly
    node_a integer Node A label
    node_b integer Node B label

    Return type

    object

    Example

    To get the information of first child assembly for which index will be 0 (starts with 0) in the assembly with label = 2 for dummy d:

    var info = d.GetAssemblyChildInfo(2, 0);


    GetAssemblyFromID(label[integer])

    Description

    Get assembly information for a given assembly ID and returns an object containing the details.

    Arguments

  • label (integer)

    The label of the assembly you want the Assembly object for.

    Returns

    Object with the following properties:

    Name Type Description
    child (read only) integer Total number of child assembly(s).
    exists (read only) logical true if assembly exists, false if not defined.
    index integer Assembly index
    label integer Assembly label
    parent integer Parent assembly label
    rx (read only) real x-angle of the assembly.
    ry (read only) real y-angle of the assembly.
    rz (read only) real z-angle of the assembly.
    title string Assembly title

    Return type

    object

    Example

    To get the information for the assembly with label = 2 for dummy d:

    var info = d.GetAssemblyFromID(2);


    GetAssemblyPart(label[integer])

    Description

    Returns an array of Part objects representing all the parts within the assembly.

    Arguments

  • label (integer)

    The label of the assembly.

    Returns

    Array of Part objects

    Return type

    Array

    Example

    To get all the parts in the assembly with label = 2 for dummy d:

    var info = d.GetAssemblyPart(2);


    GetComments()

    Description

    Extracts the comments associated to a dummy.

    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 dummy d:

    var comm_array = d.GetComments();


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

    Description

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

    Arguments

  • Model (Model)

    Model to get dummies from

  • flag (Flag)

    Flag set on the dummies that you want to retrieve

  • property (optional) (string)

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

    Returns

    Array of Dummy objects or properties

    Return type

    Array

    Example

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

    var d = Dummy.GetFlagged(m, f);

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

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


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

    Description

    Returns the Dummy object for a dummy ID.

    Arguments

  • Model (Model)

    Model to find the dummy in

  • number (integer)

    number of the dummy you want the Dummy object for

    Returns

    Dummy object (or null if dummy does not exist).

    Return type

    Dummy

    Example

    To get the Dummy object for dummy 100 in model m

    var d = Dummy.GetFromID(m, 100);


    GetParameter(prop[string])

    Description

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

    Arguments

  • prop (string)

    dummy property to get parameter for

    Returns

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

    Return type

    Parameter

    Example

    To check if Dummy property d.example is a parameter:

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

    To check if Dummy property d.example is a parameter by using the GetParameter method:

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


    GetPoint(index[integer])

    Description

    Returns the information for a reference point

    Arguments

  • index (integer)

    The index of the reference point you want the information for. Note that reference points start at 0, not 1. 0 <= index < points

    Returns

    Object with the following properties:

    Name Type Description
    assembly integer Assembly label
    csys integer Coordinate system
    hpt boolean If point has been automatically created by PRIMER at the H-point
    label integer Point label
    node integer Node label (0 if coordinate)
    rx boolean Point restrained rotationally in X
    ry boolean Point restrained rotationally in Y
    rz boolean Point restrained rotationally in Z
    title string Point title
    tx boolean Point restrained translationally in X
    ty boolean Point restrained translationally in Y
    tz boolean Point restrained translationally in Z
    x real Node/point x coordinate
    y real Node/point y coordinate
    z real Node/point z coordinate

    Return type

    object

    Example

    To get the information for the 3rd reference point for dummy d:

    var info = d.GetPoint(2);


    GetPointData(rpt[integer])

    Description

    Returns the coordinates of a reference point

    Arguments

  • rpt (integer)

    The reference point you want the coordinates for. Note that reference points start at 0, not 1.

    Returns

    Array containing the reference point coordinates

    Return type

    Array

    Example

    To get the coordinates of the 3rd reference point for dummy d:

    var c = d.GetPointData(2);


    GetPointTitle(rpt[integer])

    Description

    Returns the title of a reference point

    Arguments

  • rpt (integer)

    The reference point you want the title for. Note that reference points start at 0, not 1.

    Returns

    The reference point title

    Return type

    String

    Example

    To get the title of the 3rd reference point for dummy d:

    var c = d.GetPointTitle(2);


    Last(Model[Model]) [static]

    Description

    Returns the last dummy in the model.

    Arguments

  • Model (Model)

    Model to get last dummy in

    Returns

    Dummy object (or null if there are no dummies in the model).

    Return type

    Dummy

    Example

    To get the last dummy in model m:

    var d = Dummy.Last(m);


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

    Description

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

    Arguments

  • Model (Model)

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

    Dummy label.

    Return type

    Number

    Example

    To get the last free dummy label in model m:

    var label = Dummy.LastFreeLabel(m);


    Next()

    Description

    Returns the next dummy in the model.

    Arguments

    No arguments

    Returns

    Dummy object (or null if there are no more dummies in the model).

    Return type

    Dummy

    Example

    To get the dummy in model m after dummy d:

    var d = d.Next();


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

    Description

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

    Arguments

  • Model (Model)

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

    Dummy label.

    Return type

    Number

    Example

    To get the next free dummy label in model m:

    var label = Dummy.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 dummy.

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

    Dummy object (or null if not picked)

    Return type

    Dummy

    Example

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

    var d = Dummy.Pick('Pick dummy from screen', m);


    Previous()

    Description

    Returns the previous dummy in the model.

    Arguments

    No arguments

    Returns

    Dummy object (or null if there are no more dummies in the model).

    Return type

    Dummy

    Example

    To get the dummy in model m before dummy d:

    var d = d.Previous();


    RemovePoint(index[integer])

    Description

    Removes a reference point from a dummy

    Arguments

  • index (integer)

    The index of the reference point you want to remove. Note that reference points start at 0, not 1. 0 <= index < points

    Returns

    no return value

    Example

    To remove for the 3rd reference point for dummy d:

    d.RemovePoint(2);


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

    Description

    Renumbers all of the dummies in the model.

    Arguments

  • Model (Model)

    Model that all dummies will be renumbered in

  • start (integer)

    Start point for renumbering

    Returns

    No return value

    Example

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

    Dummy.RenumberAll(m, 1000000);


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

    Description

    Renumbers all of the flagged dummies in the model.

    Arguments

  • Model (Model)

    Model that all the flagged dummies will be renumbered in

  • flag (Flag)

    Flag set on the dummies that you want to renumber

  • start (integer)

    Start point for renumbering

    Returns

    No return value

    Example

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

    Dummy.RenumberFlagged(m, f, 1000000);


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

    Description

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

    Arguments

  • flag (Flag)

    Flag to use when selecting dummies

  • prompt (string)

    Text to display as a prompt to the user

  • limit (optional) (Model or Flag)

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

    Return type

    Number

    Example

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

    Dummy.Select(f, 'Select dummies', m);

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

    Dummy.Select(f, 'Select dummies', l);


    SelectAssembly()

    Description

    Returns an array of objects containing the assembly informaitons or null if menu cancelled.

    Arguments

    No arguments

    Returns

    Array of objects with the following properties:

    Name Type Description
    label integer Assembly label
    parent integer Parent assembly label
    title string Assembly title

    Return type

    object

    Example

    To select assemblies in dummy d, giving the prompt "Select assemblies":

    d.SelectAssembly();


    SetAssemblyNodeSet(label[integer], nsid[integer])

    Description

    Sets a set node for a Dummy/HBM assembly.

    Arguments

  • label (integer)

    The label of the assembly.

  • nsid (integer)

    The label of the set node to be added into the assembly.

    Returns

    no return value

    Example

    To set the node set with label=100 in the assembly with label = 2 for dummy d:

    d.SetAssemblyNodeSet(2, 100);


    SetAssemblyPart(label[integer], pid[integer])

    Description

    Sets a part for a Dummy assembly.

    Arguments

  • label (integer)

    The label of the assembly.

  • pid (integer)

    The label of the set part to be added into the assembly.

    Returns

    no return value

    Example

    To set the part with label=100 in the assembly with label = 2 for dummy d:

    d.SetAssemblyPart(2, 100);


    SetAssemblyPartSet(label[integer], psid[integer])

    Description

    Sets a set part for a Dummy/HBM assembly.

    Arguments

  • label (integer)

    The label of the assembly.

  • psid (integer)

    The label of the set part to be added into the assembly.

    Returns

    no return value

    Example

    To set the set part with label=100 in the assembly with label = 2 for dummy d:

    d.SetAssemblyPartSet(2, 100);


    SetAssemblyStopAngle(label[integer], axis[integer], stop_neg[real], stop_pos[real])

    Description

    Sets -ve and +ve stop angles in the assembly.

    Arguments

  • label (integer)

    The label of the assembly.

  • axis (integer)

    Axis (0 = X, 1 = Y, or 2 = Z) on which to define stop angles.

  • stop_neg (real)

    -ve stop angle.

  • stop_pos (real)

    +ve stop angle.

    Returns

    No return value

    Example

    To set -90 and 90 stop angles in X-axis in the assembly with label = 2 for dummy d:

    d.SetAssemblyStopAngle(2, 0, -90, 90);


    SetFlag(flag[Flag])

    Description

    Sets a flag on the dummy.

    Arguments

  • flag (Flag)

    Flag to set on the dummy

    Returns

    No return value

    Example

    To set flag f for dummy d:

    d.SetFlag(f);


    SetPoint(index[integer], data[object])

    Description

    Sets the data for a reference point in a dummy

    Arguments

  • index (integer)

    The index of the reference point you want to set. Note that reference points start at 0, not 1. To add a new point use index points

  • data (object)

    Object containing the reference point data. The properties can be:

    Object has the following properties:

    Name Type Description
    assembly integer Assembly label
    csys (optional) integer Coordinate system label
    node (optional) integer Node label (not rewuired if using x, y and z)
    rx (optional) boolean Point restrained rotationally in X
    ry (optional) boolean Point restrained rotationally in Y
    rz (optional) boolean Point restrained rotationally in Z
    title (optional) string Title
    tx (optional) boolean Point restrained translationally in X
    ty (optional) boolean Point restrained translationally in Y
    tz (optional) boolean Point restrained translationally in Z
    x (optional) real X coordinate (not required if using node)
    y (optional) real Y coordinate (not required if using node)
    z (optional) real Z coordinate (not required if using node)

    Returns

    no return value

    Example

    To add a new reference point to dummy d assembly 5 at node 1000 with title "Example point" restrained in x:

    var data = { assembly:5, node:1000, title:"Example point", tx:true };
    d.SetPoint(d.points, data);

    To add a new reference point to dummy d assembly 5 at (10, 20, 30) with title "Example point":

    var data = { assembly:5, x:10, y:20, z:30, title:"Example point" };
    d.SetPoint(d.points, data);


    Sketch(redraw (optional)[boolean])

    Description

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

    Arguments

  • redraw (optional) (boolean)

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

    Returns

    No return value

    Example

    To sketch dummy d:

    d.Sketch();


    SketchAssembly(label[integer], redraw (optional)[boolean])

    Description

    Sketches the assembly

    Arguments

  • label (integer)

    The label of the assembly you want to sketch.

  • 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 sketch the assembly with label 3 in dummy d:

    var info = d.SketchAssembly(3);


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

    Description

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

    Arguments

  • Model (Model)

    Model that all the flagged dummies will be sketched in

  • flag (Flag)

    Flag set on the dummies that you want to sketch

  • redraw (optional) (boolean)

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

    Dummy.SketchFlagged(m, flag);


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

    Description

    Returns the total number of dummies in the model.

    Arguments

  • Model (Model)

    Model to get total for

  • exists (optional) (boolean)

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

    Returns

    number of dummies

    Return type

    Number

    Example

    To get the total number of dummies in model m:

    var total = Dummy.Total(m);


    Unblank()

    Description

    Unblanks the dummy

    Arguments

    No arguments

    Returns

    No return value

    Example

    To unblank dummy d:

    d.Unblank();


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

    Description

    Unblanks all of the dummies in the model.

    Arguments

  • Model (Model)

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

    Dummy.UnblankAll(m);


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

    Description

    Unblanks all of the flagged dummies in the model.

    Arguments

  • Model (Model)

    Model that the flagged dummies will be unblanked in

  • flag (Flag)

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

    Dummy.UnblankFlagged(m, f);


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

    Description

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

    Arguments

  • Model (Model)

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

  • flag (Flag)

    Flag to unset on the dummies

    Returns

    No return value

    Example

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

    Dummy.UnflagAll(m, f);


    Unsketch(redraw (optional)[boolean])

    Description

    Unsketches the dummy.

    Arguments

  • redraw (optional) (boolean)

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

    Returns

    No return value

    Example

    To unsketch dummy d:

    d.Unsketch();


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

    Description

    Unsketches all dummies.

    Arguments

  • Model (Model)

    Model that all dummies will be unblanked in

  • redraw (optional) (boolean)

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

    Dummy.UnsketchAll(m);


    UnsketchAssembly(label[integer], redraw (optional)[boolean])

    Description

    Unsketches the assembly

    Arguments

  • label (integer)

    The label of the assembly you want to unsketch.

  • 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 unsketch the assembly with label 3 in dummy d:

    var info = d.UnsketchAssembly(3);


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

    Description

    Unsketches all flagged dummies in the model.

    Arguments

  • Model (Model)

    Model that all dummies will be unsketched in

  • flag (Flag)

    Flag set on the dummies that you want to unsketch

  • redraw (optional) (boolean)

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

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

    Dummy object.

    Return type

    Dummy

    Example

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

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


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

    Description

    Adds a warning for dummy. 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 dummy d:

    d.Warning("My custom warning");


    Xrefs()

    Description

    Returns the cross references for this dummy.

    Arguments

    No arguments

    Returns

    Xrefs object.

    Return type

    Xrefs

    Example

    To get the cross references for dummy d:

    var xrefs = d.Xrefs();