The PrescribedOrientationRigid class gives you access to define *BOUNDARY_PRESCRIBED_ORIENTATION_RIGID 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 |
| birth | real | Time prior to which the body moves freely under the action of other agents. |
| body | integer | Reference axes: 0 for rotations about axes fixed in PIDA or 1 for those fixed in PIDB. |
| death | real | Time when the body is freed from the restriction. |
| exists (read only) | logical | true if prescribed orientation rigid exists, false if referred to but not defined. |
| heading | string | PrescribedOrientationRigid heading |
| id | logical | true if _ID option is set, false if not. |
| include | integer | The Include file number that the prescribed orientation rigid is in. |
| intrp | integer | Interpolation method: 1 for linear interpolation or 2 for cubic spline interpolation. |
| intrp | integer | Interpolation method: 1 for linear interpolation or 2 for cubic spline interpolation. |
| iseq | integer | Specifies the sequence in which the rotations are performed. |
| ishft | integer | Angle shift: 1 for unaltered angle curves or 2 for angle data shift in LCIDQi curves eliminating discontinuities. |
| lcidc11 | integer | Load curve ID specifying direction cosine C11 as function of time. |
| lcidc12 | integer | Load curve ID specifying direction cosine C12 as function of time. |
| lcidc13 | integer | Load curve ID specifying direction cosine C13 as function of time. |
| lcidc21 | integer | Load curve ID specifying direction cosine C21 as function of time. |
| lcidc22 | integer | Load curve ID specifying direction cosine C22 as function of time. |
| lcidc23 | integer | Load curve ID specifying direction cosine C23 as function of time. |
| lcidc31 | integer | Load curve ID specifying direction cosine C31 as function of time. |
| lcidc32 | integer | Load curve ID specifying direction cosine C32 as function of time. |
| lcidc33 | integer | Load curve ID specifying direction cosine C33 as function of time. |
| lcide1 | integer | Load curve ID specifying Euler parameter e1 as function of time. |
| lcide2 | integer | Load curve ID specifying Euler parameter e2 as function of time. |
| lcide3 | integer | Load curve ID specifying Euler parameter e3 as function of time. |
| lcide4 | integer | Load curve ID specifying Euler parameter e4 as function of time. |
| lcidq1 | integer | Load curve ID specifying orientation angle q1 as function of time. |
| lcidq2 | integer | Load curve ID specifying orientation angle q2 as function of time. |
| lcidq3 | integer | Load curve ID specifying orientation angle q3 as function of time. |
| lcids | integer | Load curve ID specifying spin speed of PIDB about axis parallel to vector. |
| lcidv1 | integer | Load curve ID specifying vector measure number v1 as function of time. |
| lcidv2 | integer | Load curve ID specifying vector measure number v2 as function of time. |
| lcidv3 | integer | Load curve ID specifying vector measure number v3 as function of time. |
| model (read only) | integer | The Model number that the prescribed orientation rigid is in. |
| option | constant | The Boundary Prescribed Orientation Rigid option. Can be PrescribedOrientationRigid.DIRCOS, PrescribedOrientationRigid.ANGLES, PrescribedOrientationRigid.EULERP or PrescribedOrientationRigid.VECTOR. |
| pida | integer | Part ID for rigid body A. |
| pidb | integer | Part ID for rigid body B whose orientation is prescribed. |
| toffset | integer | Time offset flag. |
| valspin | real | Constant value for spin speed of PIDB about axis parallel to vector. Used when LCIDS is 0. |
Detailed DescriptionThe PrescribedOrientationRigid class allows you to create, modify, edit and manipulate boundary prescribed orientation rigid cards. See the documentation below for more details. |
Constructornew PrescribedOrientationRigid(Model[Model], option[constant], pidb[integer], label (optional)[integer], heading (optional)[string])DescriptionCreate a new PrescribedOrientationRigid object. |
Model that prescribed orientation rigid will be created in
Suffix for boundary prescribed orientation rigid. Can be PrescribedOrientationRigid.DIRCOS PrescribedOrientationRigid.ANGLES PrescribedOrientationRigid.EULERP PrescribedOrientationRigid.VECTOR
Part ID for rigid body B whose orientation is prescribed.
PrescribedOrientationRigid number
Title for the PrescribedOrientationRigid
ReturnsPrescribedOrientationRigid object Return typePrescribedOrientationRigid |
ExampleTo create a new prescribed orientation rigid in model m with part ID 10 and suffix _DIRCOS: var por = new PrescribedOrientationRigid(m, PrescribedOrientationRigid.DIRCOS, 10);
|
Details of functionsAssociateComment(Comment[Comment])DescriptionAssociates a comment with a prescribed orientation rigid. |
Comment that will be attached to the prescribed orientation rigid
ReturnsNo return value |
ExampleTo associate comment c to the prescribed orientation rigid por: por.AssociateComment(c);
|
Browse(modal (optional)[boolean])DescriptionStarts an edit panel in Browse mode. |
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
Returnsno return value |
ExampleTo Browse prescribed orientation rigid por: por.Browse();
|
ClearFlag(flag[Flag])DescriptionClears a flag on the prescribed orientation rigid. |
Flag to clear on the prescribed orientation rigid
ReturnsNo return value |
ExampleTo clear flag f for prescribed orientation rigid por: por.ClearFlag(f);
|
Copy(range (optional)[boolean])DescriptionCopies the prescribed orientation rigid. The target include of the copied prescribed orientation rigid 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().
ReturnsPrescribedOrientationRigid object Return typePrescribedOrientationRigid |
ExampleTo copy prescribed orientation rigid por into prescribed orientation rigid z: var z = por.Copy();
|
Create(Model[Model], modal (optional)[boolean]) [static]DescriptionStarts an interactive editing panel to create a prescribed orientation rigid |
Model that the prescribed orientation rigid will be created in.
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
ReturnsPrescribedOrientationRigid object (or null if not made). Return typePrescribedOrientationRigid |
ExampleTo start creating a prescribed orientation rigid in model m: var por = PrescribedOrientationRigid.Create(m);
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a prescribed orientation rigid. |
Comment that will be detached from the prescribed orientation rigid
ReturnsNo return value |
ExampleTo detach comment c from the prescribed orientation rigid por: por.DetachComment(c);
|
Edit(modal (optional)[boolean])DescriptionStarts an interactive editing panel. |
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
Returnsno return value |
ExampleTo Edit prescribed orientation rigid por: por.Edit();
|
Error(message[string], details (optional)[string])DescriptionAdds an error for prescribed orientation rigid. 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 prescribed orientation rigid por: por.Error("My custom error");
|
First(Model[Model]) [static]DescriptionReturns the first prescribed orientation rigid in the model. |
Model to get first prescribed orientation rigid in
ReturnsPrescribedOrientationRigid object (or null if there are no prescribed orientation rigids in the model). Return typePrescribedOrientationRigid |
ExampleTo get the first prescribed orientation rigid in model m: var por = PrescribedOrientationRigid.First(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the prescribed orientation rigids in the model with a defined flag. |
Model that all prescribed orientation rigids will be flagged in
Flag to set on the prescribed orientation rigids
ReturnsNo return value |
ExampleTo flag all of the prescribed orientation rigids with flag f in model m: PrescribedOrientationRigid.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the prescribed orientation rigid is flagged or not. |
Flag to test on the prescribed orientation rigid
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if prescribed orientation rigid por has flag f set on it: if (por.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each prescribed orientation rigid in the model. |
Model that all prescribed orientation rigids are in
Function to call for each prescribed orientation rigid
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 PrescribedOrientationRigid objects or properties for all of the prescribed orientation rigids in a model in PRIMER. If the optional property argument is not given then an array of PrescribedOrientationRigid objects is returned. If the property argument is given, that property value for each prescribed orientation rigid is returned in the array instead of a PrescribedOrientationRigid object |
Model to get prescribed orientation rigids from
Name for property to get for all prescribed orientation rigids in the model
ReturnsArray of PrescribedOrientationRigid objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a prescribed orientation rigid. |
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 prescribed orientation rigid por: var comm_array = por.GetComments();
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of PrescribedOrientationRigid objects for all of the flagged prescribed orientation rigids in a model in PRIMER If the optional property argument is not given then an array of PrescribedOrientationRigid objects is returned. If the property argument is given, then that property value for each prescribed orientation rigid is returned in the array instead of a PrescribedOrientationRigid object |
Model to get prescribed orientation rigids from
Flag set on the prescribed orientation rigids that you want to retrieve
Name for property to get for all flagged prescribed orientation rigids in the model
ReturnsArray of PrescribedOrientationRigid objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the PrescribedOrientationRigid object for a prescribed orientation rigid ID. |
Model to find the prescribed orientation rigid in
number of the prescribed orientation rigid you want the PrescribedOrientationRigid object for
ReturnsPrescribedOrientationRigid object (or null if prescribed orientation rigid does not exist). Return typePrescribedOrientationRigid |
ExampleTo get the PrescribedOrientationRigid object for prescribed orientation rigid 100 in model m var por = PrescribedOrientationRigid.GetFromID(m, 100);
|
GetParameter(prop[string])DescriptionChecks if a PrescribedOrientationRigid 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 PrescribedOrientationRigid.ViewParameters() method and 'method chaining' (see the examples below). |
prescribed orientation rigid property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
Keyword()DescriptionReturns the keyword for this prescribed orientation rigid. Note that a carriage return is not added. See also PrescribedOrientationRigid.KeywordCards() |
No arguments
Returnsstring containing the keyword. Return typeString |
ExampleTo get the keyword for prescribed orientation rigid por: var key = por.Keyword();
|
KeywordCards()DescriptionReturns the keyword cards for the prescribed orientation rigid. Note that a carriage return is not added. See also PrescribedOrientationRigid.Keyword() |
No arguments
Returnsstring containing the cards. Return typeString |
ExampleTo get the cards for prescribed orientation rigid por: var cards = por.KeywordCards();
|
Last(Model[Model]) [static]DescriptionReturns the last prescribed orientation rigid in the model. |
Model to get last prescribed orientation rigid in
ReturnsPrescribedOrientationRigid object (or null if there are no prescribed orientation rigids in the model). Return typePrescribedOrientationRigid |
ExampleTo get the last prescribed orientation rigid in model m: var por = PrescribedOrientationRigid.Last(m);
|
Next()DescriptionReturns the next prescribed orientation rigid in the model. |
No arguments
ReturnsPrescribedOrientationRigid object (or null if there are no more prescribed orientation rigids in the model). Return typePrescribedOrientationRigid |
ExampleTo get the prescribed orientation rigid in model m after prescribed orientation rigid por: var por = por.Next();
|
Previous()DescriptionReturns the previous prescribed orientation rigid in the model. |
No arguments
ReturnsPrescribedOrientationRigid object (or null if there are no more prescribed orientation rigids in the model). Return typePrescribedOrientationRigid |
ExampleTo get the prescribed orientation rigid in model m before prescribed orientation rigid por: var por = por.Previous();
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select prescribed orientation rigids using standard PRIMER object menus. |
Flag to use when selecting prescribed orientation rigids
Text to display as a prompt to the user
If the argument is a Model then only prescribed orientation rigids from that model can be selected. If the argument is a Flag then only prescribed orientation rigids that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any prescribed orientation rigids 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 prescribed orientation rigids selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the prescribed orientation rigid. |
Flag to set on the prescribed orientation rigid
ReturnsNo return value |
ExampleTo set flag f for prescribed orientation rigid por: por.SetFlag(f);
|
Sketch(redraw (optional)[boolean])DescriptionSketches the prescribed orientation rigid. The prescribed orientation rigid will be sketched until you either call PrescribedOrientationRigid.Unsketch(), PrescribedOrientationRigid.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the prescribed orientation rigid is sketched. If omitted redraw is true. If you want to sketch several prescribed orientation rigids and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch prescribed orientation rigid por: por.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged prescribed orientation rigids in the model. The prescribed orientation rigids will be sketched until you either call PrescribedOrientationRigid.Unsketch(), PrescribedOrientationRigid.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged prescribed orientation rigids will be sketched in
Flag set on the prescribed orientation rigids that you want to sketch
If model should be redrawn or not after the prescribed orientation rigids are sketched. If omitted redraw is true. If you want to sketch flagged prescribed orientation rigids several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all prescribed orientation rigids flagged with flag in model m: PrescribedOrientationRigid.SketchFlagged(m, flag);
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of prescribed orientation rigids in the model. |
Model to get total for
true if only existing prescribed orientation rigids should be counted. If false or omitted referenced but undefined prescribed orientation rigids will also be included in the total.
Returnsnumber of prescribed orientation rigids Return typeNumber |
ExampleTo get the total number of prescribed orientation rigids in model m: var total = PrescribedOrientationRigid.Total(m);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the prescribed orientation rigids in the model. |
Model that the defined flag for all prescribed orientation rigids will be unset in
Flag to unset on the prescribed orientation rigids
ReturnsNo return value |
ExampleTo unset the flag f on all the prescribed orientation rigids in model m: PrescribedOrientationRigid.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the prescribed orientation rigid. |
If model should be redrawn or not after the prescribed orientation rigid is unsketched. If omitted redraw is true. If you want to unsketch several prescribed orientation rigids and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch prescribed orientation rigid por: por.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all prescribed orientation rigids. |
Model that all prescribed orientation rigids will be unblanked in
If model should be redrawn or not after the prescribed orientation rigids 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 prescribed orientation rigids in model m: PrescribedOrientationRigid.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged prescribed orientation rigids in the model. |
Model that all prescribed orientation rigids will be unsketched in
Flag set on the prescribed orientation rigids that you want to unsketch
If model should be redrawn or not after the prescribed orientation rigids 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 prescribed orientation rigids flagged with flag in model m: PrescribedOrientationRigid.UnsketchAll(m, flag);
|
No arguments
ReturnsPrescribedOrientationRigid object. Return typePrescribedOrientationRigid |
ExampleTo check if PrescribedOrientationRigid property por.example is a parameter by using the PrescribedOrientationRigid.GetParameter() method: if (por.ViewParameters().GetParameter(por.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for prescribed orientation rigid. 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 prescribed orientation rigid por: por.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this prescribed orientation rigid. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for prescribed orientation rigid por: var xrefs = por.Xrefs();
|
toString()DescriptionCreates a string containing the prescribed orientation rigid data in keyword format. Note that this contains the keyword header and the keyword cards. See also PrescribedOrientationRigid.Keyword() and PrescribedOrientationRigid.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for prescribed orientation rigid por in keyword format var s = por.toString();
|