The Conx class gives you access to connections 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 |
| Conx.ADHESIVE_PATCH | Connection adhesive type is a patch. |
| Conx.ADHESIVE_SOLID | Connection adhesive type is a solid line. |
| Name | Description |
| Conx.BOLT_MODULE | Library bolt. |
| Conx.BOLT_MRG_2PTS | 2pt Patch Beam. |
| Conx.BOLT_MRG_2PTS_RB | 2pt Patch (Rigid Beam). |
| Conx.BOLT_MRG_2PTS_RJ | 2pt Patch Revolute joint. |
| Conx.BOLT_MRG_CYL | Cylindrical Merge. |
| Conx.BOLT_MRG_CYL_BALL | Cylindrical Patch Ball joint. |
| Conx.BOLT_MRG_CYL_BEAM | Cylindrical Patch Beam. |
| Conx.BOLT_NRB_2PTS | 2pt NRB Beam. |
| Conx.BOLT_NRB_CYL | Cylindrical NRB. |
| Conx.BOLT_NRB_CYL_BALL | Cylindrical NRB Ball joint. |
| Conx.BOLT_NRB_CYL_BEAM | Cylindrical NRB Beam. |
| Conx.BOLT_NRB_SPH | Spherical NRB. |
| Conx.BOLT_NRB_SPH_BALL | Spherical NRB Ball joint. |
| Conx.BOLT_NRB_SPH_DISC | Spherical NRB Discrete Beam. |
| Conx.RIGID_MERGE | This constant is deprecated in version 10.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. Please use Conx.BOLT_MRG_CYL instead. [deprecated] |
| Conx.RIGID_NRB | This constant is deprecated in version 10.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. Please use Conx.BOLT_NRB_CYL instead. [deprecated] |
| Name | Description |
| Conx.ADHESIVE | Connection is adhesive. |
| Conx.BOLT | Connection is a bolt. |
| Conx.RIGID | This constant is deprecated in version 10.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. Please use Conx.BOLT instead. [deprecated] |
| Conx.RIVET | Connection is rivet. |
| Conx.SPOTWELD | Connection is a spotweld. |
| Conx.SPOTWELD_LINE | Connection is a spotweld line. |
| Name | Description |
| Conx.SPOTWELD_BEAM | Connection spotweld type is beam. |
| Conx.SPOTWELD_HEXA1 | Connection spotweld type is one hexa solid/spotweld layer. |
| Conx.SPOTWELD_HEXA12 | Connection spotweld type is twelve hexa solids/spotweld layer. |
| Conx.SPOTWELD_HEXA16 | Connection spotweld type is sixteen hexa solids/spotweld layer. |
| Conx.SPOTWELD_HEXA2 | Connection spotweld type is two hexa solids/spotweld layer. |
| Conx.SPOTWELD_HEXA3 | Connection spotweld type is three hexa solids/spotweld layer. |
| Conx.SPOTWELD_HEXA4 | Connection spotweld type is four hexa solids/spotweld layer. |
| Conx.SPOTWELD_HEXA8 | Connection spotweld type is eight hexa solids/spotweld layer. |
| Conx.SPOTWELD_MIG | Connection spotweld type is (beam) MIG weld. |
| Conx.SPOTWELD_SOLID1 | This constant is deprecated in version 22.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. Connection spotweld type is one hexa solid/spotweld layer. Use Conx.SPOTWELD_HEXA1 instead. [deprecated] |
| Conx.SPOTWELD_SOLID12 | This constant is deprecated in version 22.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. Connection spotweld type is twelve hexa solids/spotweld layer. Use Conx.SPOTWELD_HEXA12 instead. [deprecated] |
| Conx.SPOTWELD_SOLID16 | This constant is deprecated in version 22.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. Connection spotweld type is sixteen hexa solids/spotweld layer. Use Conx.SPOTWELD_HEXA16 instead. [deprecated] |
| Conx.SPOTWELD_SOLID4 | This constant is deprecated in version 22.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. Connection spotweld type is four hexa solids/spotweld layer. Use Conx.SPOTWELD_HEXA4 instead. [deprecated] |
| Conx.SPOTWELD_SOLID8 | This constant is deprecated in version 22.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions. Connection spotweld type is eight hexa solids/spotweld layer. Use Conx.SPOTWELD_HEXA8 instead. [deprecated] |
| Name | Type | Description |
| adhesive_esize | real | Element size along the length of the adhesive run |
| adhesive_nelem | integer | The number of elements across the width of the adhesive |
| adhesive_width | real | The width of the adhesive run |
| angtol | real | angle tolerance for bolt |
| angtol2 | real | angle tolerance at end 2 for 2 point bolt |
| assembly | integer/string | Assembly used to specify panels connection together, rather than individual layers. Integer for a part set ID, string for a PRIMER assembly (name). |
| assembly_type | constant | The assembly type. Can be Conx.PART_SET or Conx.ASSEMBLY. |
| colour | Colour | The colour of the connection |
| diameter | real | Diameter of spotweld/rigid |
| diameter2 | real | Diameter of rigid at end 2 |
| edge_distance | real | Spotweld line edge distance |
| edge_lock | logical | true if a spotweld line is locked to an edge, false if not |
| error (read only) | string | Description of the error if the connection cannot be made |
| error_details (read only) | string | Details of the error if the connection cannot be made |
| exists (read only) | logical | true if connection exists, false if referred to but not defined. |
| fit | integer | contact fitting method for library bolts |
| id | integer | Conx number. Also see the label property which is an alternative name for this. |
| include | integer | The Include file number that the connection is in. |
| label | integer | Conx number. Also see the id property which is an alternative name for this. |
| layers | integer | The number of layers the connection has. |
| length | real | Length of 1 point bolt, max thickness for 2 point bolt |
| length2 | real | max thickness at end 2 for 2 point bolt |
| material | integer | The ID of the Material used for 'merge' bolt connections. i.e. Conx.BOLT_MRG_CYL, Conx.BOLT_MRG_CYL_BEAM, |
| model (read only) | integer | The Model number that the connection is in. |
| module | string | name of library module for bolt |
| part | integer | The ID of the Part used for adhesive or spotweld connections. Note that in v11.0 and above you are able to specify a different part IDs for elements in the connection between different layers. If you only have one part for the elements in the connection, then this is the value of this property. If there is more than one used, then the value of this property is the first part. If you set this property to a new value, then the all the elements in the connection will have this new part ID when it is realized. To set and retrieve information on parts used between different layers, the functions GetPidData() and SetPidData() should be used. |
| patch_coords | integer | The number of patch coordinate points the connection has (Adhesive patch only). |
| patch_topol | integer | The number of patch topology entries the connection has (Adhesive patch only). |
| path | integer | The number of path points the connection has (Adhesive only). Note that these points do NOT include the start and end points for the adhesive run. These are defined using the properties x, y, z and x2, y2, z2 |
| pitch | real | Spotweld line pitch |
| resize | integer | snap to points fitting method for library bolts |
| saved_settings | boolean | Whether settings are saved for a connection or not |
| shape | integer | shape for bolt attachment |
| shape2 | integer | shape for bolt attachment at end 2 for 2 point bolt |
| spr2_id (read only) | integer | Internal label of C_SPR2 which applied to this rivet connection |
| spr2_match | boolean | True to use matching C_SPR2 for this rivet. False to create new C_SPR2 for each rivet. IF unset, a new C_SPR2 will be created. |
| spr2_unshared (read only) | boolean | True if C_SPR2 is unique for this rivet |
| status | constant | The status of the connection. Can be Conx.DORMANT, Conx.MADE, Conx.INVALID, Conx.REALIZED or Conx.BAD. |
| subtype | constant | The connection subtype.
For SPOTWELD and SPOTWELD_LINE connections the subtype can be:
|
| title | string | Title for connection |
| transparency | integer | The transparency of the connection (0-100) 0% is opaque, 100% is transparent. |
| type | constant | The connection type. Can be Conx.SPOTWELD, Conx.BOLT or Conx.RIVET or Conx.ADHESIVE. |
| user_data | string | User data for connection |
| x | real | X coordinate |
| x2 | real | X coordinate for second point (adhesive only) |
| y | real | Y coordinate |
| y2 | real | Y coordinate for second point (adhesive only) |
| z | real | Z coordinate |
| z2 | real | Z coordinate for second point (adhesive only) |
Detailed DescriptionThe Conx class allows you to create, modify, edit and manipulate connections. See the documentation below for more details. |
Constructornew Conx(Model[Model], x[real], y[real], z[real], type (optional)[constant], subtype (optional)[constant], title (optional)[string])DescriptionCreate a new Conx object. |
Model that connection will be created in
X coordinate
Y coordinate
Z coordinate
Type of connection. Can be Conx.SPOTWELD, Conx.BOLT, Conx.ADHESIVE Conx.SPOTWELD_LINE or Conx.RIVET. If omitted type will be set to Conx.SPOTWELD.
Subtype of connection. See property subtype for valid values. If omitted subtype will be set to the default subtype for this type of connection.
Title for the connection
ReturnsConx object Return typeConx |
ExampleTo create a new connection in model m, at coordinates (20, 40, 10) var c = new Conx(m, 20, 40, 10);
|
Details of functionsAssociateComment(Comment[Comment])DescriptionAssociates a comment with a connection. |
Comment that will be attached to the connection
ReturnsNo return value |
ExampleTo associate comment c to the connection c: c.AssociateComment(c);
|
Blank()DescriptionBlanks the connection |
No arguments
ReturnsNo return value |
ExampleTo blank connection c: c.Blank();
|
BlankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionBlanks all of the connections in the model. |
Model that all connections 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 connections in model m: Conx.BlankAll(m);
|
BlankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionBlanks all of the flagged connections in the model. |
Model that all the flagged connections will be blanked in
Flag set on the connections 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 connections in model m flagged with f: Conx.BlankFlagged(m, f);
|
Blanked()DescriptionChecks if the connection is blanked or not. |
No arguments
Returnstrue if blanked, false if not. Return typeBoolean |
ExampleTo check if connection c is blanked: if (c.Blanked() ) do_something...
|
ClearFlag(flag[Flag])DescriptionClears a flag on the connection. |
Flag to clear on the connection
ReturnsNo return value |
ExampleTo clear flag f for connection c: c.ClearFlag(f);
|
Copy(range (optional)[boolean])DescriptionCopies the connection. The target include of the copied connection 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().
ReturnsConx object Return typeConx |
ExampleTo copy connection c into connection z: var z = c.Copy();
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a connection. |
Comment that will be detached from the connection
ReturnsNo return value |
ExampleTo detach comment c from the connection c: c.DetachComment(c);
|
EmptyPatch()DescriptionEmpties the patch topology/coordinates data. |
No arguments
ReturnsNo return value. |
ExampleTo empty the patch topology/coordinates data for connection c; c.EmptyPatch();
|
Error(message[string], details (optional)[string])DescriptionAdds an error for connection. 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 connection c: c.Error("My custom error");
|
ExtractColour()DescriptionExtracts the actual colour used for connection. |
No arguments
Returnscolour value (integer) Return typeNumber |
ExampleTo return the colour used for drawing connection c: var colour = c.ExtractColour();
|
First(Model[Model]) [static]DescriptionReturns the first connection in the model. |
Model to get first connection in
ReturnsConx object (or null if there are no connections in the model). Return typeConx |
ExampleTo get the first connection in model m: var c = Conx.First(m);
|
FirstFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the first free connection label in the model. Also see Conx.LastFreeLabel(), Conx.NextFreeLabel() and Model.FirstFreeItemLabel(). |
Model to get first free connection 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).
ReturnsConx label. Return typeNumber |
ExampleTo get the first free connection label in model m: var label = Conx.FirstFreeLabel(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the connections in the model with a defined flag. |
Model that all connections will be flagged in
Flag to set on the connections
ReturnsNo return value |
ExampleTo flag all of the connections with flag f in model m: Conx.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the connection is flagged or not. |
Flag to test on the connection
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if connection c has flag f set on it: if (c.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each connection in the model. |
Model that all connections are in
Function to call for each connection
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 Conx objects or properties for all of the connections in a model in PRIMER. If the optional property argument is not given then an array of Conx objects is returned. If the property argument is given, that property value for each connection is returned in the array instead of a Conx object |
Model to get connections from
Name for property to get for all connections in the model
ReturnsArray of Conx objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a connection. |
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 connection c: var comm_array = c.GetComments();
|
GetElements()DescriptionReturns the beams/solids that are used in the connection weld. |
No arguments
ReturnsAn array containing the element IDs (or null if no elements). Return typeArray |
ExampleTo get the elements for connection c: var elems = c.GetElements();
|
GetEntities(type[string])DescriptionReturns list of the entities of type that are used in the connection. |
The type of the item in the reference list (for a list of types see Appendix I of the PRIMER manual).
ReturnsAn array containing the item IDs (or null if none). Return typeArray |
ExampleTo get list of nodes for connection c: var items = c.GetEntities("NODE");
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of Conx objects for all of the flagged connections in a model in PRIMER If the optional property argument is not given then an array of Conx objects is returned. If the property argument is given, then that property value for each connection is returned in the array instead of a Conx object |
Model to get connections from
Flag set on the connections that you want to retrieve
Name for property to get for all flagged connections in the model
ReturnsArray of Conx objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the Conx object for a connection ID. |
Model to find the connection in
number of the connection you want the Conx object for
ReturnsConx object (or null if connection does not exist). Return typeConx |
ExampleTo get the Conx object for connection 100 in model m var c = Conx.GetFromID(m, 100);
|
GetLayerData(layer[integer])DescriptionReturns the data for a layer of the connection. |
The layer you want the data for. Note that layers start at 0, not 1.
ReturnsAn array containing the layer data. Return typeArray |
ExampleTo get the data for the 3rd layer for connection c: var l_data = c.GetLayerData(2);
|
GetLayerShells(layer[integer])DescriptionReturns the attached shells for a layer of the connection. |
The layer you want the data for. Note that layers start at 0, not 1.
ReturnsArray of Shell objects or null if not valid Return typeArray |
ExampleTo get the attached shells for the 3rd layer for connection c: var shells = c.GetLayerShells(2);
|
GetParameter(prop[string])DescriptionChecks if a Conx 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 Conx.ViewParameters() method and 'method chaining' (see the examples below). |
connection property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
GetPatchCoords(point[integer])DescriptionReturns the data for a patch coordinate of an adhesive patch connection. |
The point you want the data for. Note that points start at 0, not 1.
ReturnsAn array containing the patch coordinate. Return typeArray |
ExampleTo get the data for the 3rd patch coordinate for connection c: var p_data = c.GetPatchCoords(2);
|
GetPatchTopol(point[integer])DescriptionReturns the topology for a patch quad/tria of an adhesive patch connection. |
The patch quad/tria you want the data for. Note that points start at 0, not 1.
ReturnsArray of numbers containing the patch topology information. Return typeNumber |
ExampleTo get the data for the 3rd patch quad/tria for connection c: var p_data = c.GetPatchTopol(2);
|
GetPathData(point[integer])DescriptionReturns the data for a path point of an adhesive/spotweld line connection. |
The point you want the data for. Note that points start at 0, not 1.
ReturnsAn array containing the path data. Return typeArray |
ExampleTo get the data for the 3rd path point for connection c: var p_data = c.GetPathData(2);
|
No arguments
ReturnsArray of Part objects Return typeArray |
ExampleTo make an array of Part objects for connection c var arr = c.GetPidData();
|
GetSettings()DescriptionReturns an object of settings stored with the connection. |
No arguments
Returns |
Object with the following properties:
| Name | Type | Description |
| angle_tolerance | real | Angle tolerance |
| bolt_adjust_mass | boolean | Adjust bolt mass when creating bolt entitites |
| bolt_dth_beam | boolean | Add database history beam when bolt beam is created |
| bolt_feature_line | boolean | Consider feature line for bolt holes |
| bolt_nrb_min_mass | real | Bolt rigid NRB minimum mass |
| bolt_part_min_mass | real | Bolt rigid part minimum mass |
| clinch | boolean | Allow connections to join a clinch type connection |
| consistent_weld_area | boolean | Turn on consistent weld area so multihex welds are pi*d*d/4 |
| edge_distance | real | Edge distance |
| glue_break_angle | real | Glue break angle |
| glue_hard_aspect | real | Glue hard aspect ratio |
| glue_soft_aspect | real | Glue soft aspect ratio |
| length_check | boolean | Check length |
| max_length | real | Maximum length |
| max_panels | integer | Maximum number of panels |
| max_warpage | real | Maximum warpage |
| min_length | real | Minimum length |
| nrb_arcweld (optional) | boolean | Create arcweld using NRBs (rather than contact) |
| panel_check | boolean | Check for maximum number of panels |
| patch_angle | real | Patch angle setting |
| patch_angle_check | boolean | Turn on or off patch angle check |
| same_part | boolean | Allow connections to join a part to itself |
| solid_free_edges | boolean | Consider free edges when orienting single solid spotwelds |
| spot_line_tol | real | Spotweld line search tolerance |
| spot_thickness | real | Search thickness |
| total_length | real | Total length |
| use_pid | boolean | Use _PID for beam connections |
| warpage_check | boolean | Check warpage value |
object
ExampleTo make an Oject containing the stored settings of connection c var o = Conx.GetSettings();
|
ID of the connection layer containing the shells from which the thicknesses will be extracted. If a value of zero or lower is input, all layers will be considered in the output data.
Returns |
An array containing a number of objects equal to the number of solid elements in the connection. Each object has the following properties:
| Name | Type | Description |
| shelln | Shell | Shell object in the specified layer in contact with the nth node the solid adhesive element, where n can be a value from 1 to 8. This corresponds to the maximum number of nodes in the solid element. |
| solid | Solid | Solid object associated with the shells in the return object. |
| sthkn | Double | Thickness of shell in the specified layer in contact with the nth node of the solid adhesive element, where n can be a value from 1 to 8. |
object
Keyword()DescriptionReturns the keyword for this connection (*CONNECTION_START_SPOTWELD etc). Note that a carriage return is not added. See also Conx.KeywordCards() |
No arguments
Returnsstring containing the keyword. Return typeString |
ExampleTo get the keyword for connection c: var key = c.Keyword();
|
KeywordCards()DescriptionReturns the keyword cards for the connection. Note that a carriage return is not added. See also Conx.Keyword() |
No arguments
Returnsstring containing the cards. Return typeString |
ExampleTo get the cards for connection c: var cards = c.KeywordCards();
|
Last(Model[Model]) [static]DescriptionReturns the last connection in the model. |
Model to get last connection in
ReturnsConx object (or null if there are no connections in the model). Return typeConx |
ExampleTo get the last connection in model m: var c = Conx.Last(m);
|
LastFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the last free connection label in the model. Also see Conx.FirstFreeLabel(), Conx.NextFreeLabel() and see Model.LastFreeItemLabel() |
Model to get last free connection 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.
ReturnsConx label. Return typeNumber |
ExampleTo get the last free connection label in model m: var label = Conx.LastFreeLabel(m);
|
Next()DescriptionReturns the next connection in the model. |
No arguments
ReturnsConx object (or null if there are no more connections in the model). Return typeConx |
ExampleTo get the connection in model m after connection c: var c = c.Next();
|
NextFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the next free (highest+1) connection label in the model. Also see Conx.FirstFreeLabel(), Conx.LastFreeLabel() and Model.NextFreeItemLabel() |
Model to get next free connection 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).
ReturnsConx label. Return typeNumber |
ExampleTo get the next free connection label in model m: var label = Conx.NextFreeLabel(m);
|
Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]DescriptionAllows the user to pick a connection. |
Text to display as a prompt to the user
If the argument is a Model then only connections from that model can be picked. If the argument is a Flag then only connections that are flagged with limit can be selected. If omitted, or null, any connections 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.
ReturnsConx object (or null if not picked) Return typeConx |
ExampleTo pick a connection from model m giving the prompt 'Pick connection from screen': var c = Conx.Pick('Pick connection from screen', m);
|
Previous()DescriptionReturns the previous connection in the model. |
No arguments
ReturnsConx object (or null if there are no more connections in the model). Return typeConx |
ExampleTo get the connection in model m before connection c: var c = c.Previous();
|
RealizeAll(Model[Model]) [static]DescriptionRealizes all of the connections in the model. |
Model that all connections will be realized in
ReturnsNo return value |
ExampleTo realize all of the connections in model m: Conx.RealizeAll(m);
|
RealizeFlagged(Model[Model], flag[Flag]) [static]DescriptionRealizes all of the flagged connections in the model. |
Model that the flagged connections will be realized in
Flag set on the connections that you want to realize
ReturnsNo return value |
ExampleTo realize all of the connections in model m flagged with f: Conx.RealizeFlagged(m, f);
|
ReloadConnectors() [static]DescriptionReload all modules from primer_library/connectors |
No arguments
ReturnsNo return value |
Example
Conx.ReloadConnectors();
|
RemovePatchTopol(layer[integer])DescriptionDeletes the topology at a particular location for patch type adhesive. |
The topology location you want to remove. Note that layers start at 0, not 1.
ReturnsNo return value. |
ExampleTo remove the 3rd topology data for connection c: c.RemovePatchTopol(2);
|
RemovePathData(layer[integer])DescriptionDeletes a pathc point for a line adhesive connection. |
The point you want to remove. Note that layers start at 0, not 1.
ReturnsNo return value. |
ExampleTo remove the 3rd point from connection c: c.RemovePathData(2);
|
RenumberAll(Model[Model], start[integer]) [static]DescriptionRenumbers all of the connections in the model. |
Model that all connections will be renumbered in
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber all of the connections in model m, from 1000000: Conx.RenumberAll(m, 1000000);
|
RenumberFlagged(Model[Model], flag[Flag], start[integer]) [static]DescriptionRenumbers all of the flagged connections in the model. |
Model that all the flagged connections will be renumbered in
Flag set on the connections that you want to renumber
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber all of the connections in model m flagged with f, from 1000000: Conx.RenumberFlagged(m, f, 1000000);
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select connections using standard PRIMER object menus. |
Flag to use when selecting connections
Text to display as a prompt to the user
If the argument is a Model then only connections from that model can be selected. If the argument is a Flag then only connections that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any connections 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 connections selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the connection. |
Flag to set on the connection
ReturnsNo return value |
ExampleTo set flag f for connection c: c.SetFlag(f);
|
SetLayerData(layer[integer], item1[integer/string], item2 (optional)[integer/string], ... (optional)[integer/string])DescriptionSets the data for a layer of the connection. |
The layer you want to set the data for. Note that layers start at 0, not 1.
The first item for the layer definition. As layer definitions can be part IDs,
part names, CAD names, part set IDs, part set names or assemby names the following logic is used.
If the item is an integer it is assumed to be a part ID. If the item is a string then it must be
in the format 'P<part ID>', 'P:<part name>', 'C:<CAD name>', 'S<set ID>',
'S:<set name>'
or 'A:<assembly name>'.
The second item for the layer definition. This must be type same type as item1. e.g. if item1 is a part ID, item2 must be a part ID (it cannot be a part name etc).
The nth item for the layer definition. This must be type same type as item1. e.g. if item1 is a part ID, this item must be a part ID (it cannot be a part name etc).
ReturnsNo return value. |
ExampleTo set the data for the 3rd layer for connection c, to be part IDs 10 and 20: c.SetLayerData(2, 10, 20); or var a = new Array(10, 20); c.SetLayerData(2, a);
|
SetPatchCoords(point[integer], x[real], y[real], z[real])DescriptionSets a coordinate used by the adhesive patch connection type. |
The point you want to set the data for. Note that points start at 0, not 1.
X coordinate of point
Y coordinate of point
Z coordinate of point
ReturnsNo return value. |
ExampleTo set the position for the 3rd patch point for connection c, to be (10, 20, 30); c.SetPatchCoords(2, 10, 20, 30);
|
SetPatchTopol(point[integer], c1[integer], c2[integer], c3[integer], c4 (optional)[integer])DescriptionSets the topology used by the adhesive patch connection type. |
The point you want to set the data for. Note that points start at 0, not 1.
1st coordinate location point
2nd coordinate location point
3rd coordinate location point
4th coordinate location point
ReturnsNo return value. |
ExampleTo set the topology for the 3rd patch quad/tria for connection c, to be (1, 4, 3, 6); c.SetPatchTopol(2, 1, 4, 3, 6);
|
SetPathData(point[integer], x[real], y[real], z[real])DescriptionSets the data for a path point of the connection. |
The point you want to set the data for. Note that points start at 0, not 1.
X coordinate of point
Y coordinate of point
Z coordinate of point
ReturnsNo return value. |
ExampleTo set the position for the 3rd path point for connection c, to be (10, 20, 30); c.SetPathData(2, 10, 20, 30);
|
Part label of the first item in the PID layer list.
The second item for the layer definition.
The nth item for the layer definition.
ReturnsNo return value. |
ExampleTo set the part data for c, to be part IDs 10 and 20: c.SetPidData(10, 20); or var a = new Array(10, 20); c.SetPidData(a);
|
The diameter to set for the ring
ReturnsNo return value |
ExampleTo set the diameter for a ring to be 10.0: Conx.SetRuleDiameter(10.0);
|
The PID to set for the spotweld or adhesive elements
ReturnsNo return value |
ExampleTo set the PID for a spotweld to be 1000: Conx.SetRuleFEPID(1000);
|
The PID to set for the ring
ReturnsNo return value |
ExampleTo set the PID for a ring to be 1000: Conx.SetRulePID(1000);
|
SetSettings(data[object])DescriptionSets the settings stored on a connection entity. Not applicable for bolts. |
Object containing the connection settings data. The properties can be:
Object has the following properties:
| Name | Type | Description |
| angle_tolerance (optional) | real | Angle tolerance |
| bolt_adjust_mass (optional) | boolean | Adjust bolt mass when creating bolt entities |
| bolt_dth_beam (optional) | boolean | Add database history beam when bolt is created |
| bolt_feature_line (optional) | boolean | Consider feature line for bolt holes |
| bolt_nrb_min_mass (optional) | real | Bolt NRB minimum mass |
| bolt_part_min_mass (optional) | real | Bolt rigid part minimum mass |
| clinch (optional) | boolean | Allow connections to join a clinch type connection |
| consistent_weld_area (optional) | boolean | Use consistent area for multihex welds |
| edge_distance (optional) | real | Edge distance |
| glue_break_angle (optional) | real | Glue break angle |
| glue_hard_aspect (optional) | real | Glue hard aspect ratio |
| glue_soft_aspect (optional) | real | Glue soft aspect ratio |
| length_check (optional) | boolean | Check the connection length |
| max_length (optional) | real | Maximum length of connection |
| max_panels (optional) | integer | Maximum number of panels |
| max_warpage (optional) | real | Maximum warpage |
| min_length (optional) | real | Minimum length of connection |
| nrb_arcweld (optional) | boolean | Create arcweld using NRBs (rather than contact) |
| panel_check (optional) | boolean | Check for maximum number of panels |
| patch_angle (optional) | real | Patch angle |
| patch_angle_check (optional) | boolean | Check the patch angle |
| same_part (optional) | boolean | Allow connections to join a part to itself |
| solid_free_edges (optional) | boolean | Consider free edges when orienting single solid spotwelds |
| spot_line_tol (optional) | real | Spotweld line search tolerance |
| spot_thickness (optional) | real | Search thickness |
| total_length (optional) | real | Total length of connection |
| use_pid (optional) | boolean | Use _PID for beam connections |
| warpage_check (optional) | boolean | Check warpage value |
ReturnsNo return value. |
ExampleTo set the various settings for a connection c: var data = { length_check:true, total_length:1.5, warpage_check:false, angle_tolerance:5.0 };
c.SetSettings(data);
|
Sketch(redraw (optional)[boolean])DescriptionSketches the connection. The connection will be sketched until you either call Conx.Unsketch(), Conx.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the connection is sketched. If omitted redraw is true. If you want to sketch several connections and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch connection c: c.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged connections in the model. The connections will be sketched until you either call Conx.Unsketch(), Conx.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged connections will be sketched in
Flag set on the connections that you want to sketch
If model should be redrawn or not after the connections are sketched. If omitted redraw is true. If you want to sketch flagged connections several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all connections flagged with flag in model m: Conx.SketchFlagged(m, flag);
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of connections in the model. |
Model to get total for
true if only existing connections should be counted. If false or omitted referenced but undefined connections will also be included in the total.
Returnsnumber of connections Return typeNumber |
ExampleTo get the total number of connections in model m: var total = Conx.Total(m);
|
Unblank()DescriptionUnblanks the connection |
No arguments
ReturnsNo return value |
ExampleTo unblank connection c: c.Unblank();
|
UnblankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the connections in the model. |
Model that all connections 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 connections in model m: Conx.UnblankAll(m);
|
UnblankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the flagged connections in the model. |
Model that the flagged connections will be unblanked in
Flag set on the connections 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 connections in model m flagged with f: Conx.UnblankFlagged(m, f);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the connections in the model. |
Model that the defined flag for all connections will be unset in
Flag to unset on the connections
ReturnsNo return value |
ExampleTo unset the flag f on all the connections in model m: Conx.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the connection. |
If model should be redrawn or not after the connection is unsketched. If omitted redraw is true. If you want to unsketch several connections and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch connection c: c.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all connections. |
Model that all connections will be unblanked in
If model should be redrawn or not after the connections 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 connections in model m: Conx.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged connections in the model. |
Model that all connections will be unsketched in
Flag set on the connections that you want to unsketch
If model should be redrawn or not after the connections 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 connections flagged with flag in model m: Conx.UnsketchAll(m, flag);
|
UseParentLayer(option[boolean]) [static]DescriptionTrue (default) means put bolt FE into parent layer where possible. |
True (default) means put bolt FE into parent layer where possible.
ReturnsNo return value |
ExampleTo switch off use of parent layer (and use current layer) Conx.UseParentLayer(false);
|
UseSPR2Pref(option[boolean]) [static]DescriptionTrue (default) means use the pref settings for C_SPR2 created when rivet realized. |
True (default) means use the pref settings for C_SPR2 created when rivet realized.
ReturnsNo return value |
ExampleTo ignore any pref settings and use zero for newly created C_SPR2 cards Conx.UseSPR2Pref(false);
|
No arguments
ReturnsConx object. Return typeConx |
ExampleTo check if Conx property c.example is a parameter by using the Conx.GetParameter() method: if (c.ViewParameters().GetParameter(c.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for connection. 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 connection c: c.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this connection. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for connection c: var xrefs = c.Xrefs();
|
toString()DescriptionCreates a string containing the connection data in keyword format. Note that this contains the keyword header and the keyword cards. See also Conx.Keyword() and Conx.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for connection n in keyword format var s = c.toString();
|