The StrainSolid class gives you access to define initial strain solid 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 | Description |
| StrainSolid.SET | Initial is *INITIAL_STRESS_SOLID_SET. |
| StrainSolid.SOLID | Initial is *INITIAL_STRESS_SOLID. |
| Name | Type | Description |
| eid | integer | Solid Element ID or solid set ID |
| epsxx | real | Define the xxth strain component in the global cartesian system. |
| epsxy | real | Define the xyth strain component in the global cartesian system. |
| epsyy | real | Define the yyth strain component in the global cartesian system. |
| epsyz | real | Define the yzth strain component in the global cartesian system. |
| epszx | real | Define the zxth strain component in the global cartesian system. |
| epszz | real | Define the zzth strain component in the global cartesian system. |
| exists (read only) | logical | true if initial strain solid exists, false if referred to but not defined. |
| include | integer | The Include file number that the initial strain solid is in. |
| model (read only) | integer | The Model number that the initial strain solid is in. |
| type | constant | The Intial strain solid type. Can be StrainSolid.SOLID or StrainSolid.SET. |
Detailed DescriptionThe StrainSolid class allows you to create, modify, edit and manipulate *INITIAL_STRESS_SOLID cards. See the documentation below for more details. |
Constructornew StrainSolid(Model[Model], type[constant], eid[integer], epsxx[real], epsyy[real], epszz[real], epsxy[real], epsyz[real], epszx[real])DescriptionCreate a new StrainSolid object. |
Model that strain_solid will be created in
Specify the type of initial strain solid (Can be StrainSolid.SOLID or StrainSolid.SET)
Solid Element ID or solid set ID
The xxth strain component in the global cartesian system.
The yyth strain component in the global cartesian system.
The zzth strain component in the global cartesian system.
The xyth strain component in the global cartesian system.
The yzth strain component in the global cartesian system.
The zxth strain component in the global cartesian system.
ReturnsStrainSolid object Return typeStrainSolid |
Details of functionsAssociateComment(Comment[Comment])DescriptionAssociates a comment with a initial strain solid. |
Comment that will be attached to the initial strain solid
ReturnsNo return value |
ExampleTo associate comment c to the initial strain solid iso: iso.AssociateComment(c);
|
ClearFlag(flag[Flag])DescriptionClears a flag on the initial strain solid. |
Flag to clear on the initial strain solid
ReturnsNo return value |
ExampleTo clear flag f for initial strain solid iso: iso.ClearFlag(f);
|
Copy(range (optional)[boolean])DescriptionCopies the initial strain solid. The target include of the copied initial strain solid 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().
ReturnsStrainSolid object Return typeStrainSolid |
ExampleTo copy initial strain solid iso into initial strain solid z: var z = iso.Copy();
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a initial strain solid. |
Comment that will be detached from the initial strain solid
ReturnsNo return value |
ExampleTo detach comment c from the initial strain solid iso: iso.DetachComment(c);
|
Error(message[string], details (optional)[string])DescriptionAdds an error for initial strain solid. 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 initial strain solid iso: iso.Error("My custom error");
|
First(Model[Model]) [static]DescriptionReturns the first initial strain solid in the model. |
Model to get first initial strain solid in
ReturnsStrainSolid object (or null if there are no initial strain solids in the model). Return typeStrainSolid |
ExampleTo get the first initial strain solid in model m: var iso = StrainSolid.First(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the initial strain solids in the model with a defined flag. |
Model that all initial strain solids will be flagged in
Flag to set on the initial strain solids
ReturnsNo return value |
ExampleTo flag all of the initial strain solids with flag f in model m: StrainSolid.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the initial strain solid is flagged or not. |
Flag to test on the initial strain solid
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if initial strain solid iso has flag f set on it: if (iso.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each initial strain solid in the model. |
Model that all initial strain solids are in
Function to call for each initial strain solid
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 StrainSolid objects or properties for all of the initial strain solids in a model in PRIMER. If the optional property argument is not given then an array of StrainSolid objects is returned. If the property argument is given, that property value for each initial strain solid is returned in the array instead of a StrainSolid object |
Model to get initial strain solids from
Name for property to get for all initial strain solids in the model
ReturnsArray of StrainSolid objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a initial strain solid. |
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 initial strain solid iso: var comm_array = iso.GetComments();
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of StrainSolid objects for all of the flagged initial strain solids in a model in PRIMER If the optional property argument is not given then an array of StrainSolid objects is returned. If the property argument is given, then that property value for each initial strain solid is returned in the array instead of a StrainSolid object |
Model to get initial strain solids from
Flag set on the initial strain solids that you want to retrieve
Name for property to get for all flagged initial strain solids in the model
ReturnsArray of StrainSolid objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the StrainSolid object for a initial strain solid ID. |
Model to find the initial strain solid in
number of the initial strain solid you want the StrainSolid object for
ReturnsStrainSolid object (or null if initial strain solid does not exist). Return typeStrainSolid |
ExampleTo get the StrainSolid object for initial strain solid 100 in model m var iso = StrainSolid.GetFromID(m, 100);
|
GetParameter(prop[string])DescriptionChecks if a StrainSolid 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 StrainSolid.ViewParameters() method and 'method chaining' (see the examples below). |
initial strain solid property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
Keyword()DescriptionReturns the keyword for this initial strain solid (*INITIAL_STRESS_SOLID). Note that a carriage return is not added. See also StrainSolid.KeywordCards() |
No arguments
Returnsstring containing the keyword. Return typeString |
ExampleTo get the keyword for strain_solid i: var key = i.Keyword();
|
KeywordCards()DescriptionReturns the keyword cards for the initial strain solid. Note that a carriage return is not added. See also StrainSolid.Keyword() |
No arguments
Returnsstring containing the cards. Return typeString |
ExampleTo get the cards for strain_solid i: var cards = i.KeywordCards();
|
Last(Model[Model]) [static]DescriptionReturns the last initial strain solid in the model. |
Model to get last initial strain solid in
ReturnsStrainSolid object (or null if there are no initial strain solids in the model). Return typeStrainSolid |
ExampleTo get the last initial strain solid in model m: var iso = StrainSolid.Last(m);
|
Next()DescriptionReturns the next initial strain solid in the model. |
No arguments
ReturnsStrainSolid object (or null if there are no more initial strain solids in the model). Return typeStrainSolid |
ExampleTo get the initial strain solid in model m after initial strain solid iso: var iso = iso.Next();
|
Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]DescriptionAllows the user to pick a initial strain solid. |
Text to display as a prompt to the user
If the argument is a Model then only initial strain solids from that model can be picked. If the argument is a Flag then only initial strain solids that are flagged with limit can be selected. If omitted, or null, any initial strain solids 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.
ReturnsStrainSolid object (or null if not picked) Return typeStrainSolid |
ExampleTo pick a initial strain solid from model m giving the prompt 'Pick initial strain solid from screen': var iso = StrainSolid.Pick('Pick initial strain solid from screen', m);
|
Previous()DescriptionReturns the previous initial strain solid in the model. |
No arguments
ReturnsStrainSolid object (or null if there are no more initial strain solids in the model). Return typeStrainSolid |
ExampleTo get the initial strain solid in model m before initial strain solid iso: var iso = iso.Previous();
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select initial strain solids using standard PRIMER object menus. |
Flag to use when selecting initial strain solids
Text to display as a prompt to the user
If the argument is a Model then only initial strain solids from that model can be selected. If the argument is a Flag then only initial strain solids that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any initial strain solids 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 initial strain solids selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the initial strain solid. |
Flag to set on the initial strain solid
ReturnsNo return value |
ExampleTo set flag f for initial strain solid iso: iso.SetFlag(f);
|
Sketch(redraw (optional)[boolean])DescriptionSketches the initial strain solid. The initial strain solid will be sketched until you either call StrainSolid.Unsketch(), StrainSolid.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the initial strain solid is sketched. If omitted redraw is true. If you want to sketch several initial strain solids and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch initial strain solid iso: iso.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged initial strain solids in the model. The initial strain solids will be sketched until you either call StrainSolid.Unsketch(), StrainSolid.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged initial strain solids will be sketched in
Flag set on the initial strain solids that you want to sketch
If model should be redrawn or not after the initial strain solids are sketched. If omitted redraw is true. If you want to sketch flagged initial strain solids several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all initial strain solids flagged with flag in model m: StrainSolid.SketchFlagged(m, flag);
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of initial strain solids in the model. |
Model to get total for
true if only existing initial strain solids should be counted. If false or omitted referenced but undefined initial strain solids will also be included in the total.
Returnsnumber of initial strain solids Return typeNumber |
ExampleTo get the total number of initial strain solids in model m: var total = StrainSolid.Total(m);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the initial strain solids in the model. |
Model that the defined flag for all initial strain solids will be unset in
Flag to unset on the initial strain solids
ReturnsNo return value |
ExampleTo unset the flag f on all the initial strain solids in model m: StrainSolid.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the initial strain solid. |
If model should be redrawn or not after the initial strain solid is unsketched. If omitted redraw is true. If you want to unsketch several initial strain solids and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch initial strain solid iso: iso.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all initial strain solids. |
Model that all initial strain solids will be unblanked in
If model should be redrawn or not after the initial strain solids 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 initial strain solids in model m: StrainSolid.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged initial strain solids in the model. |
Model that all initial strain solids will be unsketched in
Flag set on the initial strain solids that you want to unsketch
If model should be redrawn or not after the initial strain solids 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 initial strain solids flagged with flag in model m: StrainSolid.UnsketchAll(m, flag);
|
No arguments
ReturnsStrainSolid object. Return typeStrainSolid |
ExampleTo check if StrainSolid property iso.example is a parameter by using the StrainSolid.GetParameter() method: if (iso.ViewParameters().GetParameter(iso.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for initial strain solid. 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 initial strain solid iso: iso.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this initial strain solid. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for initial strain solid iso: var xrefs = iso.Xrefs();
|
toString()DescriptionCreates a string containing the initial strain solid data in keyword format. Note that this contains the keyword header and the keyword cards. See also StrainSolid.Keyword() and StrainSolid.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for strain_solid i in keyword format var s = i.toString();
|