The LoadBodyGeneralized class gives you access to define load body generalized 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:
| Name | Type | Description |
| angtyp | string | Type of body loads |
| ax | real | Scale factor for acceleration in x-direction |
| ay | real | Scale factor for acceleration in y-direction |
| az | real | Scale factor for acceleration in z-direction |
| cid | integer | Coordinate system ID to define acceleration |
| drlcid | real | Curve ID for dynamic relaxation phase |
| exists (read only) | logical | true if load body generalized exists, false if referred to but not defined. |
| include | integer | The Include file number that the load body generalized is in. |
| lcid | integer | Curve ID |
| model (read only) | integer | The Model number that the load body generalized is in. |
| n1 | integer | Beginning Node ID for body force load or the node or Part set ID |
| n2 | integer | Ending Node ID for body force load. Set to zero if a set ID is defined |
| omx | real | Scale factor for x-angular velocity or acceleration |
| omy | real | Scale factor for y-angular velocity or acceleration |
| omz | real | Scale factor for z-angular velocity or acceleration |
| type | constant | The Load Node type, can be LoadBodyGeneralized.NODE or LoadBodyGeneralized.SET_NODE or LoadBodyGeneralized.SET_PART. |
| xc | real | X-center of rotation |
| yc | real | Y-center of rotation |
| zc | real | Z-center of rotation |
Detailed DescriptionThe LoadBodyGeneralized class allows you to create, modify, edit and manipulate load body generalized cards. See the documentation below for more details. |
Constructornew LoadBodyGeneralized(Model[Model], type[constant], n1[integer], n2[integer], lcid[integer], drlcid (optional)[integer], xc (optional)[real], yc (optional)[real], zc (optional)[real], ax (optional)[real], ay (optional)[real], az (optional)[real], omx (optional)[real], omy (optional)[real], omz (optional)[real], cid (optional)[integer], angtyp (optional)[string])DescriptionCreate a new LoadBodyGeneralized object. |
Model that load body generalized will be created in
Specify the type of load body generalized (Can be LoadBodyGeneralized.NODE or LoadBodyGeneralized.SET_NODE or LoadBodyGeneralized.SET_PART)
Beginning Node ID for body force load or the node or Part set ID
Ending Node ID for body force load. Set to zero if a set ID is defined
Curve ID
Curve ID for dynamic relaxation phase
X-center of rotation
Y-center of rotation
Z-center of rotation
Scale factor for acceleration in x-direction
Scale factor for acceleration in y-direction
Scale factor for acceleration in z-direction
Scale factor for x-angular velocity or acceleration
Scale factor for y-angular velocity or acceleration
Scale factor for z-angular velocity or acceleration
Coordinate system ID to define acceleration
Type of body loads
ReturnsLoadBodyGeneralized object Return typeLoadBodyGeneralized |
ExampleTo create a new load body generalized in model m, of type SET_NODE, with LCID 9 and N2 is 2 var b = new LoadBodyGeneralized(m, LoadBodyGeneralized.SET_NODE, 100, 2, 9);
|
Details of functionsAssociateComment(Comment[Comment])DescriptionAssociates a comment with a load body generalized. |
Comment that will be attached to the load body generalized
ReturnsNo return value |
ExampleTo associate comment c to the load body generalized lbg: lbg.AssociateComment(c);
|
Blank()DescriptionBlanks the load body generalized |
No arguments
ReturnsNo return value |
ExampleTo blank load body generalized lbg: lbg.Blank();
|
BlankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionBlanks all of the load body generalizeds in the model. |
Model that all load body generalizeds 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 load body generalizeds in model m: LoadBodyGeneralized.BlankAll(m);
|
BlankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionBlanks all of the flagged load body generalizeds in the model. |
Model that all the flagged load body generalizeds will be blanked in
Flag set on the load body generalizeds 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 load body generalizeds in model m flagged with f: LoadBodyGeneralized.BlankFlagged(m, f);
|
Blanked()DescriptionChecks if the load body generalized is blanked or not. |
No arguments
Returnstrue if blanked, false if not. Return typeBoolean |
ExampleTo check if load body generalized lbg is blanked: if (lbg.Blanked() ) do_something...
|
ClearFlag(flag[Flag])DescriptionClears a flag on the load body generalized. |
Flag to clear on the load body generalized
ReturnsNo return value |
ExampleTo clear flag f for load body generalized lbg: lbg.ClearFlag(f);
|
Copy(range (optional)[boolean])DescriptionCopies the load body generalized. The target include of the copied load body generalized 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().
ReturnsLoadBodyGeneralized object Return typeLoadBodyGeneralized |
ExampleTo copy load body generalized lbg into load body generalized z: var z = lbg.Copy();
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a load body generalized. |
Comment that will be detached from the load body generalized
ReturnsNo return value |
ExampleTo detach comment c from the load body generalized lbg: lbg.DetachComment(c);
|
Error(message[string], details (optional)[string])DescriptionAdds an error for load body generalized. 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 load body generalized lbg: lbg.Error("My custom error");
|
First(Model[Model]) [static]DescriptionReturns the first load body generalized in the model. |
Model to get first load body generalized in
ReturnsLoadBodyGeneralized object (or null if there are no load body generalizeds in the model). Return typeLoadBodyGeneralized |
ExampleTo get the first load body generalized in model m: var lbg = LoadBodyGeneralized.First(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the load body generalizeds in the model with a defined flag. |
Model that all load body generalizeds will be flagged in
Flag to set on the load body generalizeds
ReturnsNo return value |
ExampleTo flag all of the load body generalizeds with flag f in model m: LoadBodyGeneralized.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the load body generalized is flagged or not. |
Flag to test on the load body generalized
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if load body generalized lbg has flag f set on it: if (lbg.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each load body generalized in the model. |
Model that all load body generalizeds are in
Function to call for each load body generalized
An optional extra object/array/string etc that will appended to arguments when calling the function
ReturnsNo return value |
GetAll(Model[Model], property (optional)[string]) [static]DescriptionReturns an array of LoadBodyGeneralized objects or properties for all of the load body generalizeds in a model in PRIMER. If the optional property argument is not given then an array of LoadBodyGeneralized objects is returned. If the property argument is given, that property value for each load body generalized is returned in the array instead of a LoadBodyGeneralized object |
Model to get load body generalizeds from
Name for property to get for all load body generalizeds in the model
ReturnsArray of LoadBodyGeneralized objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a load body generalized. |
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 load body generalized lbg: var comm_array = lbg.GetComments();
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of LoadBodyGeneralized objects for all of the flagged load body generalizeds in a model in PRIMER If the optional property argument is not given then an array of LoadBodyGeneralized objects is returned. If the property argument is given, then that property value for each load body generalized is returned in the array instead of a LoadBodyGeneralized object |
Model to get load body generalizeds from
Flag set on the load body generalizeds that you want to retrieve
Name for property to get for all flagged load body generalizeds in the model
ReturnsArray of LoadBodyGeneralized objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the LoadBodyGeneralized object for a load body generalized ID. |
Model to find the load body generalized in
number of the load body generalized you want the LoadBodyGeneralized object for
ReturnsLoadBodyGeneralized object (or null if load body generalized does not exist). Return typeLoadBodyGeneralized |
ExampleTo get the LoadBodyGeneralized object for load body generalized 100 in model m var lbg = LoadBodyGeneralized.GetFromID(m, 100);
|
GetParameter(prop[string])DescriptionChecks if a LoadBodyGeneralized 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 LoadBodyGeneralized.ViewParameters() method and 'method chaining' (see the examples below). |
load body generalized property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
Keyword()DescriptionReturns the keyword for this load body generalized (*LOAD_NODE_xxxx). Note that a carriage return is not added. See also LoadBodyGeneralized.KeywordCards() |
No arguments
Returnsstring containing the keyword. Return typeString |
ExampleTo get the keyword for load body generalized m: var key = m.Keyword();
|
KeywordCards()DescriptionReturns the keyword cards for the load body generalized. Note that a carriage return is not added. See also LoadBodyGeneralized.Keyword() |
No arguments
Returnsstring containing the cards. Return typeString |
ExampleTo get the cards for load body generalized l: var cards = l.KeywordCards();
|
Last(Model[Model]) [static]DescriptionReturns the last load body generalized in the model. |
Model to get last load body generalized in
ReturnsLoadBodyGeneralized object (or null if there are no load body generalizeds in the model). Return typeLoadBodyGeneralized |
ExampleTo get the last load body generalized in model m: var lbg = LoadBodyGeneralized.Last(m);
|
Next()DescriptionReturns the next load body generalized in the model. |
No arguments
ReturnsLoadBodyGeneralized object (or null if there are no more load body generalizeds in the model). Return typeLoadBodyGeneralized |
ExampleTo get the load body generalized in model m after load body generalized lbg: var lbg = lbg.Next();
|
Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]DescriptionAllows the user to pick a load body generalized. |
Text to display as a prompt to the user
If the argument is a Model then only load body generalizeds from that model can be picked. If the argument is a Flag then only load body generalizeds that are flagged with limit can be selected. If omitted, or null, any load body generalizeds 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.
ReturnsLoadBodyGeneralized object (or null if not picked) Return typeLoadBodyGeneralized |
ExampleTo pick a load body generalized from model m giving the prompt 'Pick load body generalized from screen': var lbg = LoadBodyGeneralized.Pick('Pick load body generalized from screen', m);
|
Previous()DescriptionReturns the previous load body generalized in the model. |
No arguments
ReturnsLoadBodyGeneralized object (or null if there are no more load body generalizeds in the model). Return typeLoadBodyGeneralized |
ExampleTo get the load body generalized in model m before load body generalized lbg: var lbg = lbg.Previous();
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select load body generalizeds using standard PRIMER object menus. |
Flag to use when selecting load body generalizeds
Text to display as a prompt to the user
If the argument is a Model then only load body generalizeds from that model can be selected. If the argument is a Flag then only load body generalizeds that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any load body generalizeds 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 load body generalizeds selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the load body generalized. |
Flag to set on the load body generalized
ReturnsNo return value |
ExampleTo set flag f for load body generalized lbg: lbg.SetFlag(f);
|
Sketch(redraw (optional)[boolean])DescriptionSketches the load body generalized. The load body generalized will be sketched until you either call LoadBodyGeneralized.Unsketch(), LoadBodyGeneralized.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the load body generalized is sketched. If omitted redraw is true. If you want to sketch several load body generalizeds and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch load body generalized lbg: lbg.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged load body generalizeds in the model. The load body generalizeds will be sketched until you either call LoadBodyGeneralized.Unsketch(), LoadBodyGeneralized.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged load body generalizeds will be sketched in
Flag set on the load body generalizeds that you want to sketch
If model should be redrawn or not after the load body generalizeds are sketched. If omitted redraw is true. If you want to sketch flagged load body generalizeds several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all load body generalizeds flagged with flag in model m: LoadBodyGeneralized.SketchFlagged(m, flag);
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of load body generalizeds in the model. |
Model to get total for
true if only existing load body generalizeds should be counted. If false or omitted referenced but undefined load body generalizeds will also be included in the total.
Returnsnumber of load body generalizeds Return typeNumber |
ExampleTo get the total number of load body generalizeds in model m: var total = LoadBodyGeneralized.Total(m);
|
Unblank()DescriptionUnblanks the load body generalized |
No arguments
ReturnsNo return value |
ExampleTo unblank load body generalized lbg: lbg.Unblank();
|
UnblankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the load body generalizeds in the model. |
Model that all load body generalizeds 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 load body generalizeds in model m: LoadBodyGeneralized.UnblankAll(m);
|
UnblankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the flagged load body generalizeds in the model. |
Model that the flagged load body generalizeds will be unblanked in
Flag set on the load body generalizeds 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 load body generalizeds in model m flagged with f: LoadBodyGeneralized.UnblankFlagged(m, f);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the load body generalizeds in the model. |
Model that the defined flag for all load body generalizeds will be unset in
Flag to unset on the load body generalizeds
ReturnsNo return value |
ExampleTo unset the flag f on all the load body generalizeds in model m: LoadBodyGeneralized.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the load body generalized. |
If model should be redrawn or not after the load body generalized is unsketched. If omitted redraw is true. If you want to unsketch several load body generalizeds and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch load body generalized lbg: lbg.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all load body generalizeds. |
Model that all load body generalizeds will be unblanked in
If model should be redrawn or not after the load body generalizeds 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 load body generalizeds in model m: LoadBodyGeneralized.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged load body generalizeds in the model. |
Model that all load body generalizeds will be unsketched in
Flag set on the load body generalizeds that you want to unsketch
If model should be redrawn or not after the load body generalizeds 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 load body generalizeds flagged with flag in model m: LoadBodyGeneralized.UnsketchAll(m, flag);
|
No arguments
ReturnsLoadBodyGeneralized object. Return typeLoadBodyGeneralized |
ExampleTo check if LoadBodyGeneralized property lbg.example is a parameter by using the LoadBodyGeneralized.GetParameter() method: if (lbg.ViewParameters().GetParameter(lbg.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for load body generalized. 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 load body generalized lbg: lbg.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this load body generalized. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for load body generalized lbg: var xrefs = lbg.Xrefs();
|
toString()DescriptionCreates a string containing the load body generalized data in keyword format. Note that this contains the keyword header and the keyword cards. See also LoadBodyGeneralized.Keyword() and LoadBodyGeneralized.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for load body generalized l in keyword format var s = l.toString();
|