The Belt class gives you access to belt fitting 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:
| Name | Description |
| Belt.INSERT_AFTER | Insert after given path point. |
| Belt.INSERT_BEFORE | Insert before given path point. |
| Name | Type | Description |
| acuteAngle | real | Limiting angle to be considered "acute" (0 means 90) |
| curvature | real | Maximum permitted transverse belt curvature in degrees |
| elemSet (read only) | integer | Set of shell or 2D seatbelt elements. Only created if the option to generate a contact for the belt is used |
| exists (read only) | logical | true if belt exists, false if referred to but not defined. |
| friction | real | Transverse friction coefficient |
| id | integer | Belt number. Also see the label property which is an alternative name for this. |
| include | integer | The Include file number that the belt is in. |
| iterations | integer | The number of fitting iterations between contact bucket resorts |
| label | integer | Belt number. Also see the id property which is an alternative name for this. |
| length | real | The characteristic length of each belt element |
| meshSegs (read only) | integer | Number of mesh segments defined |
| model (read only) | integer | The Model number that the belt is in. |
| n2sContact (read only) | integer | Nodes to Surface contact used between nodes on 1D belt elements and dummy structure. Only set if the AUTOMATIC_NODES_TO_SURFACE contact is defined in Seatbelts contact panel. Optional contact, see "Contact: Creating a Contact between Belt and Dummy" section in the PRIMER manual for more information. |
| nodeSet (read only) | integer | Set of all nodes in seatbelt. Only created if the option to generate a contact for the belt is used |
| nrbFirst (read only) | integer | First nodal rigid body ID |
| nrbLast (read only) | integer | Last nodal rigid body ID |
| nsboSet (read only) | integer | Set of nodes on 1D seatbelt elements only. Only created if the option to generate a contact for the belt is used |
| overlap | real | Fraction by which facets are extended during contact checking to stop nodes "falling into gaps" |
| parts | integer | Part set ID defining structure. Note that if you are creating the seatbelt definition from scratch in JavaScript you must define a shell, solid or thick shell set. |
| penetration | real | Maximum penetration distance considered for contact into solid and thick shell elements |
| pidShell | integer | The part ID for any 2D seatbelt elements |
| pid_1d | integer | The part ID for any 1D seatbelt elements |
| pid_2d | integer | The part ID for any 2D seatbelt elements |
| points (read only) | integer | Number of path points defined |
| projection | real | Initial projection distance by which belt path is "thrown outwards" at start of fitting |
| psiShell | real | Optional orthotropic angle for any shell elements |
| psi_2d | real | Optional orthotropic angle for any 2D seatbelt elements |
| retractorFirst (read only) | integer | First retractor ID |
| retractorLast (read only) | integer | Last retractor ID |
| rows | integer | The number of rows of 2D elements across the belt |
| s2sContact (read only) | integer | Surface to Surface contact used between shell/2D belt elements and dummy structure. Only set if the AUTOMATIC_SURFACE_TO_SURFACE contact is defined in Seatbelts contact panel. Optional contact, see "Contact: Creating a Contact between Belt and Dummy" section in the PRIMER manual for more information. |
| seatbeltFirst (read only) | integer | First 1D seatbelt ID |
| seatbeltLast (read only) | integer | Last 1D seatbelt ID |
| segments (read only) | integer | Segment set created for contact |
| shells | integer | Shell set ID defining structure. Note that if you are creating the seatbelt definition from scratch in JavaScript you must define a shell, solid or thick shell set. |
| slen_1d | real | The initial slack length for any 1D seatbelt elements |
| slipringFirst (read only) | integer | First slipring ID |
| slipringLast (read only) | integer | Last slipring ID |
| solids | integer | Solid set ID defining structure. Note that if you are creating the seatbelt definition from scratch in JavaScript you must define a shell, solid or thick shell set. |
| t1Shell | real | Optional thickness at n1 for any shell elements |
| t1_2d | real | Optional thickness at n1 for any 2D seatbelt elements |
| t2Shell | real | Optional thickness at n2 for any shell elements |
| t2_2d | real | Optional thickness at n2 for any 2D seatbelt elements |
| t3Shell | real | Optional thickness at n3 for any shell elements |
| t3_2d | real | Optional thickness at n3 for any 2D seatbelt elements |
| t4Shell | real | Optional thickness at n4 for any shell elements |
| t4_2d | real | Optional thickness at n4 for any 2D seatbelt elements |
| thickFactor | real | Factor used when thickFlag is 1 |
| thickFlag | integer | Thickness used during fitting: 0 (default)=use true thickness; 1=use true thickness x factor; 2=use neutral axis (no thickness) |
| thickness | real | The thickness of 2D belt elements |
| title | string | Belt title. |
| tolerance | real | The convergence tolerance at which fitting halts |
| tshells | integer | Thick shell set ID defining structure. Note that if you are creating the seatbelt definition from scratch in JavaScript you must define a shell, solid or thick shell set. |
| width | real | The overall belt width |
| xsect_pretext | string | If X-Section pretext option is set to 2 then string for additional pretext |
| xsect_pretext_option | integer | X-Section pretext option, 0: None, 1: Automatic, 2: Manual |
| xsectionFirst (read only) | integer | First cross section ID |
| xsectionLast (read only) | integer | Last cross section ID |
Detailed DescriptionThe Belt class allows you to create, modify, and manipulate belt fitting definitions. See the documentation below for more details. |
Constructornew Belt(model[Model], id[integer], title (optional)[string], structural_type (optional)[string], flag (optional)[integer])DescriptionCreate a new Belt object. |
Model that the belt definition will be created in
Belt number
Title for the belt
Seatbelt will be fitted around this entity type. This will trigger creation of sets as required. Type can be one of MODEL, DUMMY, PART, any ELEMENT subtype such as SHELL, or any SET subtype such as SET_PART. See Appendix I of the PRIMER manual for more information on PRIMER types
Flag used to identify entities that the belt should fit around. This argument is ignored if structural_type is MODEL. Instead, the current model is used
ReturnsBelt object Return typeBelt |
ExampleTo create a new belt called 'Example' in model m with label 100: var b = new Belt(m, 100, 'Example');
|
Details of functionsAssociateComment(Comment[Comment])DescriptionAssociates a comment with a belt. |
Comment that will be attached to the belt
ReturnsNo return value |
ExampleTo associate comment c to the belt b: b.AssociateComment(c);
|
Blank()DescriptionBlanks the belt |
No arguments
ReturnsNo return value |
ExampleTo blank belt b: b.Blank();
|
BlankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionBlanks all of the belts in the model. |
Model that all belts will be blanked in
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().
ReturnsNo return value |
ExampleTo blank all of the belts in model m: Belt.BlankAll(m);
|
BlankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionBlanks all of the flagged belts in the model. |
Model that all the flagged belts will be blanked in
Flag set on the belts that you want to blank
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().
ReturnsNo return value |
ExampleTo blank all of the belts in model m flagged with f: Belt.BlankFlagged(m, f);
|
Blanked()DescriptionChecks if the belt is blanked or not. |
No arguments
Returnstrue if blanked, false if not. Return typeBoolean |
ExampleTo check if belt b is blanked: if (b.Blanked() ) do_something...
|
ClearFlag(flag[Flag])DescriptionClears a flag on the belt. |
Flag to clear on the belt
ReturnsNo return value |
ExampleTo clear flag f for belt b: b.ClearFlag(f);
|
Copy(range (optional)[boolean])DescriptionCopies the belt. The target include of the copied belt can be set using Options.copy_target_include. |
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().
ReturnsBelt object Return typeBelt |
ExampleTo copy belt b into belt z: var z = b.Copy();
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a belt. |
Comment that will be detached from the belt
ReturnsNo return value |
ExampleTo detach comment c from the belt b: b.DetachComment(c);
|
Error(message[string], details (optional)[string])DescriptionAdds an error for belt. For more details on checking see the Check class. |
The error message to give
An optional detailed error message
ReturnsNo return value |
ExampleTo add an error message "My custom error" for belt b: b.Error("My custom error");
|
First(Model[Model]) [static]DescriptionReturns the first belt in the model. |
Model to get first belt in
ReturnsBelt object (or null if there are no belts in the model). Return typeBelt |
ExampleTo get the first belt in model m: var b = Belt.First(m);
|
FirstFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the first free belt label in the model. Also see Belt.LastFreeLabel(), Belt.NextFreeLabel() and Model.FirstFreeItemLabel(). |
Model to get first free belt label in
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).
ReturnsBelt label. Return typeNumber |
ExampleTo get the first free belt label in model m: var label = Belt.FirstFreeLabel(m);
|
Fit()Description(Re)fits belt |
No arguments
ReturnsNo return value |
ExampleTo (re)fit belt b: b.Fit();
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the belts in the model with a defined flag. |
Model that all belts will be flagged in
Flag to set on the belts
ReturnsNo return value |
ExampleTo flag all of the belts with flag f in model m: Belt.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the belt is flagged or not. |
Flag to test on the belt
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if belt b has flag f set on it: if (b.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each belt in the model. |
Model that all belts are in
Function to call for each belt
An optional extra object/array/string etc that will appended to arguments when calling the function
ReturnsNo return value |
Generate()DescriptionGenerates belt mesh. Extracts and uses existing mesh properties when a mesh is present; inserts a default mesh otherwise. |
No arguments
ReturnsNo return value |
ExampleTo generate a mesh for belt b: b.Generate();
|
GetAll(Model[Model], property (optional)[string]) [static]DescriptionReturns an array of Belt objects or properties for all of the belts in a model in PRIMER. If the optional property argument is not given then an array of Belt objects is returned. If the property argument is given, that property value for each belt is returned in the array instead of a Belt object |
Model to get belts from
Name for property to get for all belts in the model
ReturnsArray of Belt objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a belt. |
No arguments
ReturnsArray of Comment objects (or null if there are no comments associated to the node). Return typeArray |
ExampleTo get the array of comments associated to the belt b: var comm_array = b.GetComments();
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of Belt objects for all of the flagged belts in a model in PRIMER If the optional property argument is not given then an array of Belt objects is returned. If the property argument is given, then that property value for each belt is returned in the array instead of a Belt object |
Model to get belts from
Flag set on the belts that you want to retrieve
Name for property to get for all flagged belts in the model
ReturnsArray of Belt objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the Belt object for a belt ID. |
Model to find the belt in
number of the belt you want the Belt object for
ReturnsBelt object (or null if belt does not exist). Return typeBelt |
ExampleTo get the Belt object for belt 100 in model m var b = Belt.GetFromID(m, 100);
|
GetMesh(index[integer])DescriptionReturns the information for a belt mesh section (properties base_pt1, base_pt2, path_pt1, path_pt2, mode, lb1, lb2). See Belt.SetMesh() for more information on supported properties. Must be preceded by a call to Belt.Generate(). |
The index of the mesh section you want the information for. Note that mesh segments start at 0, not 1. 0 <= index < meshSegs
ReturnsObject containing the mesh section information Return typeObject |
ExampleTo get the information for the 3rd mesh section for belt b: var info = b.GetMesh(2);
|
GetParameter(prop[string])DescriptionChecks if a Belt 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 Belt.ViewParameters() method and 'method chaining' (see the examples below). |
belt property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
The index of the path point you want the information for. Note that path points start at 0, not 1. 0 <= index < points
ReturnsObject containing the path point information Return typeObject |
ExampleTo get the information for the 3rd path point for belt b: var info = b.GetPoint(2);
|
InsertPoint(index[integer], position[integer], data[object])DescriptionInserts a path point before/after an existing one. Subsequent path points will be moved 'up' as required. |
The index of an existing path point. Note that path points start at 0, not 1. 0 <= index < points
Do we want to insert before or after the path point denoted by index? The position can be Belt.INSERT_AFTER or Belt.INSERT_BEFORE
Object containing the path point data.
Object has the following properties:
| Name | Type | Description |
| fixity | integer | Point fixity type. Bitwise 'or' of the Path point fixity constants: Belt.B_POST_SLIPRING, Belt.FREE_SLIPRING, Belt.KNOWN, Belt.RETRACTOR, Belt.TWIST, Belt.XSEC |
| node (optional) | integer | Node label (not required if using x, y and z) |
| tnode1 (optional) | integer | Twist node 1 label |
| tnode2 (optional) | integer | Twist node 2 label |
| tnx1 (optional) | real | X component of normal vector 1 |
| tnx2 (optional) | real | X component of normal vector 2 |
| tny1 (optional) | real | Y component of normal vector 1 |
| tny2 (optional) | real | Y component of normal vector 2 |
| tnz1 (optional) | real | Z component of normal vector 1 |
| tnz2 (optional) | real | Z component of normal vector 2 |
| trx1 (optional) | real | X component of twist radial vector 1 |
| trx2 (optional) | real | X component of twist radial vector 2 |
| try1 (optional) | real | Y component of twist radial vector 1 |
| try2 (optional) | real | Y component of twist radial vector 2 |
| trz1 (optional) | real | Z component of twist radial vector 1 |
| trz2 (optional) | real | Z component of twist radial vector 2 |
| 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) |
Returnsno return value |
Last(Model[Model]) [static]DescriptionReturns the last belt in the model. |
Model to get last belt in
ReturnsBelt object (or null if there are no belts in the model). Return typeBelt |
ExampleTo get the last belt in model m: var b = Belt.Last(m);
|
LastFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the last free belt label in the model. Also see Belt.FirstFreeLabel(), Belt.NextFreeLabel() and see Model.LastFreeItemLabel() |
Model to get last free belt label in
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.
ReturnsBelt label. Return typeNumber |
ExampleTo get the last free belt label in model m: var label = Belt.LastFreeLabel(m);
|
Next()DescriptionReturns the next belt in the model. |
No arguments
ReturnsBelt object (or null if there are no more belts in the model). Return typeBelt |
ExampleTo get the belt in model m after belt b: var b = b.Next();
|
NextFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the next free (highest+1) belt label in the model. Also see Belt.FirstFreeLabel(), Belt.LastFreeLabel() and Model.NextFreeItemLabel() |
Model to get next free belt label in
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).
ReturnsBelt label. Return typeNumber |
ExampleTo get the next free belt label in model m: var label = Belt.NextFreeLabel(m);
|
Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]DescriptionAllows the user to pick a belt. |
Text to display as a prompt to the user
If the argument is a Model then only belts from that model can be picked. If the argument is a Flag then only belts that are flagged with limit can be selected. If omitted, or null, any belts from any model can be selected. from any model.
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.
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.
ReturnsBelt object (or null if not picked) Return typeBelt |
ExampleTo pick a belt from model m giving the prompt 'Pick belt from screen': var b = Belt.Pick('Pick belt from screen', m);
|
Previous()DescriptionReturns the previous belt in the model. |
No arguments
ReturnsBelt object (or null if there are no more belts in the model). Return typeBelt |
ExampleTo get the belt in model m before belt b: var b = b.Previous();
|
RemovePoint(index[integer])DescriptionRemoves a path point from a belt |
The index of the path point you want to remove. Note that path points start at 0, not 1. 0 <= index < points
Returnsno return value |
ExampleTo remove for the 3rd path point for belt b: b.RemovePoint(2);
|
RenumberAll(Model[Model], start[integer]) [static]DescriptionRenumbers all of the belts in the model. |
Model that all belts will be renumbered in
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber all of the belts in model m, from 1000000: Belt.RenumberAll(m, 1000000);
|
RenumberFlagged(Model[Model], flag[Flag], start[integer]) [static]DescriptionRenumbers all of the flagged belts in the model. |
Model that all the flagged belts will be renumbered in
Flag set on the belts that you want to renumber
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber all of the belts in model m flagged with f, from 1000000: Belt.RenumberFlagged(m, f, 1000000);
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select belts using standard PRIMER object menus. |
Flag to use when selecting belts
Text to display as a prompt to the user
If the argument is a Model then only belts from that model can be selected. If the argument is a Flag then only belts that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any belts can be selected. from any model.
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.
ReturnsNumber of belts selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the belt. |
Flag to set on the belt
ReturnsNo return value |
ExampleTo set flag f for belt b: b.SetFlag(f);
|
SetMesh(index[integer], data[object])DescriptionSets the data for various properties for a mesh section in a belt. Values for properties not invoked will be retained as is. Must be preceded by a call to Belt.Generate() |
The index of the mesh section you want to set. Note that mesh segments start at 0, not 1
Object containing the mesh section data.
Object has the following properties:
| Name | Type | Description |
| base_pt1 | integer | 1st base point number |
| base_pt2 | integer | 2nd base point number |
| lb1 | integer | Number of belt elements at the 1st end for mixed modes |
| lb2 | integer | Number of belt elements at the 2nd end for mixed modes |
| mode | integer | Meshing modes can be of old style or new style.
The following old style constants are available: Belt.MSEG_B1_ONLY, Belt.MSEG_B2_ONLY, Belt.MSEG_SH_ONLY, Belt.MSEG_MIX_SB1, Belt.MSEG_MIX_SB2 The following constant must be invoked in order to use the new style: Belt.MSEG_BD_NEW The following new style constants are available: Belt.MSEG_E1_1D, Belt.MSEG_E1_2D, Belt.MSEG_E1_SH, Belt.MSEG_E2_1D, Belt.MSEG_E2_2D, Belt.MSEG_E2_SH, Belt.MSEG_CE_1D, Belt.MSEG_CE_2D, Belt.MSEG_CE_SH |
| path_pt1 | integer | 1st path point number |
| path_pt2 | integer | 2nd path point number |
| retractor (optional) | integer | Retractor id to be used |
Returnsno return value |
SetMeshingLabels(entity_type[constant], label_value[integer]) [static]DescriptionSet the start labels for the entities created for a Seat Belt. |
The Meshing label can be Belt.MESH_NODE, Belt.MESH_SHELL, Belt.MESH_SET_NODE, Belt.MESH_SET_SHELL, Belt.MESH_SEATBELT, Belt.MESH_NRBC, BELT.MESH_RETRACTOR, Belt.MESH_XSEC, Belt.MESH_SLIPRING, Belt.MESH_SET_PART, Belt.MESH_2D_SLIPRING_SET_NODE, Belt.MESH_ALL.
The initial label value to be assigned for the entity type.
Returnsno return value |
ExampleTo get the initial value of the node label in seatbelt meshing as 1000: Belt.SetMeshingLabels(Belt.MESH_NODE,1000)
|
SetPoint(index[integer], data[object])DescriptionSets the data for a path point in a belt |
The index of the path point you want to set. Note that path points start at 0, not 1. To add a new point use index points
Object containing the path point data.
Object has the following properties:
| Name | Type | Description |
| fixity | integer | Point fixity type. Bitwise 'or' of the Path point fixity constants: Belt.B_POST_SLIPRING, Belt.FREE_SLIPRING, Belt.KNOWN, Belt.RETRACTOR, Belt.TWIST, Belt.XSEC |
| node (optional) | integer | Node label (not required if using x, y and z) |
| tnode1 (optional) | integer | Twist node 1 label |
| tnode2 (optional) | integer | Twist node 2 label |
| tnx1 (optional) | real | X component of normal vector 1 |
| tnx2 (optional) | real | X component of normal vector 2 |
| tny1 (optional) | real | Y component of normal vector 1 |
| tny2 (optional) | real | Y component of normal vector 2 |
| tnz1 (optional) | real | Z component of normal vector 1 |
| tnz2 (optional) | real | Z component of normal vector 2 |
| trx1 (optional) | real | X component of twist radial vector 1 |
| trx2 (optional) | real | X component of twist radial vector 2 |
| try1 (optional) | real | Y component of twist radial vector 1 |
| try2 (optional) | real | Y component of twist radial vector 2 |
| trz1 (optional) | real | Z component of twist radial vector 1 |
| trz2 (optional) | real | Z component of twist radial vector 2 |
| 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) |
Returnsno return value |
Sketch(redraw (optional)[boolean])DescriptionSketches the belt. The belt will be sketched until you either call Belt.Unsketch(), Belt.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the belt is sketched. If omitted redraw is true. If you want to sketch several belts and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch belt b: b.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged belts in the model. The belts will be sketched until you either call Belt.Unsketch(), Belt.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged belts will be sketched in
Flag set on the belts that you want to sketch
If model should be redrawn or not after the belts are sketched. If omitted redraw is true. If you want to sketch flagged belts several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all belts flagged with flag in model m: Belt.SketchFlagged(m, flag);
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of belts in the model. |
Model to get total for
true if only existing belts should be counted. If false or omitted referenced but undefined belts will also be included in the total.
Returnsnumber of belts Return typeNumber |
ExampleTo get the total number of belts in model m: var total = Belt.Total(m);
|
Unblank()DescriptionUnblanks the belt |
No arguments
ReturnsNo return value |
ExampleTo unblank belt b: b.Unblank();
|
UnblankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the belts in the model. |
Model that all belts will be unblanked in
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().
ReturnsNo return value |
ExampleTo unblank all of the belts in model m: Belt.UnblankAll(m);
|
UnblankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the flagged belts in the model. |
Model that the flagged belts will be unblanked in
Flag set on the belts that you want to unblank
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().
ReturnsNo return value |
ExampleTo unblank all of the belts in model m flagged with f: Belt.UnblankFlagged(m, f);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the belts in the model. |
Model that the defined flag for all belts will be unset in
Flag to unset on the belts
ReturnsNo return value |
ExampleTo unset the flag f on all the belts in model m: Belt.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the belt. |
If model should be redrawn or not after the belt is unsketched. If omitted redraw is true. If you want to unsketch several belts and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch belt b: b.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all belts. |
Model that all belts will be unblanked in
If model should be redrawn or not after the belts 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().
ReturnsNo return value |
ExampleTo unsketch all belts in model m: Belt.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged belts in the model. |
Model that all belts will be unsketched in
Flag set on the belts that you want to unsketch
If model should be redrawn or not after the belts 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().
ReturnsNo return value |
ExampleTo unsketch all belts flagged with flag in model m: Belt.UnsketchAll(m, flag);
|
No arguments
ReturnsBelt object. Return typeBelt |
ExampleTo check if Belt property b.example is a parameter by using the Belt.GetParameter() method: if (b.ViewParameters().GetParameter(b.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for belt. For more details on checking see the Check class. |
The warning message to give
An optional detailed warning message
ReturnsNo return value |
ExampleTo add a warning message "My custom warning" for belt b: b.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this belt. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for belt b: var xrefs = b.Xrefs();
|