The Contact class gives you access to define contact 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 |
| Contact.CROSSED_EDGES | Return crossed edges in Contact.Interactions() |
| Contact.MPP_MODE | MPP penetration check mode |
| Contact.PENETRATIONS | Return penetrations in Contact.Interactions() |
| Contact.SMP_MODE | SMP penetration check mode |
| Name | Description |
| Contact.BEAM_OFFSET | Adds _BEAM_OFFSET option |
| Contact.CONSTR_OFFSET | Adds _CONSTRAINED_OFFSET option |
| Contact.NO_OFFSET | No offset option added. |
| Contact.SIMPLE_OFFSET | Adds _OFFSET option |
| Name | Description |
| Contact.MPP_METHOD | Launches the penetration edit panel with the MPP methodology turned on |
| Contact.SMP_METHOD | Launches the penetration edit panel with the SMP methodology turned on |
| Name | Type | Description |
| bt | real | Contact birth time |
| check_mode | integer | Checking mode on the pen check edit panel. (Can be Contact.MPP_METHOD, Contact.MPP_METHOD or Contact.SMP_METHOD) |
| cid | integer | Contact number (identical to label. |
| colour | Colour | The colour of the contact |
| contact_penchk_dup_shells | integer | Shell treatment on the pen check edit panel. (Can be Contact.SHELL_AUTO, Contact.SHELL_AUTO or Contact.SHELL_THIN or Contact.SHELL_THICK) |
| dc | real | Exponential decay coeff |
| dt | real | Contact death time |
| exists (read only) | logical | true if contact exists, false if referred to but not defined. |
| fd | real | Dynamic coeff of friction |
| fs | real | Static coeff of friction |
| fsf | real | Coulomb friction scale factor |
| heading | string | Contact heading |
| id | logical | true if _ID option is set, false if not |
| include | integer | The Include file number that the contact is in. |
| label | integer | Contact number. |
| model (read only) | integer | The Model number that the contact is in. |
| mortar | logical | _MORTAR keyword option - true if set, false if not. |
| offset_flag | integer | _OFFSET option. (Can be Contact.NO_OFFSET, Contact.SIMPLE_OFFSET, Contact.CONSTR_OFFSET or Contact.BEAM_OFFSET) |
| penchk | integer | Penetration search flag |
| saboxid | integer | Surface A box id |
| sapr | integer | Surface A side printout flag |
| sast | real | Optional surface A side shell thickness |
| sbboxid | integer | Surface B box id |
| sbpr | integer | Surface B side printout flag |
| sbst | real | Optional surface B side shell thickness |
| sfsa | real | Scale factor on surface A penalty stiffness |
| sfsat | real | Scale factor on true surface A shell thickness |
| sfsb | real | Scale factor on surface B penalty stiffness |
| sfsbt | real | Scale factor on true surface B shell thickness |
| surfa | integer | Surface A set id |
| surfatyp | integer | Surface A set type |
| surfb | integer | Surface B set id |
| surfbtyp | integer | Surface B set type |
| type | string | Contact type ("AUTOMATIC_GENERAL", "SINGLE_SURFACE" etc). |
| vc | real | Coeff for viscous friction |
| vdc | real | Visous damping coefficient |
| vsf | real | Viscous friction scale factor |
| Name | Type | Description |
| kpf | real | Kinematic partition factor |
| Name | Type | Description |
| erosop | integer | Erosion/interior node option |
| iadj | integer | Adjacent matl treatment for solids |
| isym | integer | Symmetry plane option |
| Name | Type | Description |
| lcid1 | integer | Loadcurve ID for Dyn rel stiffness |
| lcid2 | integer | Loadcurve ID for Transient stiffness |
| Name | Type | Description |
| fcm | integer | Force calculation method |
| lcid | integer | Loadcurve ID for Force vs penetration curve |
| us | real | Optional unloading stiffness |
| Name | Type | Description |
| cid_rcf | integer | Coordinate system ID to output rcforc force resultants and ncforc data in a local system |
| dprfac | real | Depth of penetration reduction factor |
| dtstif | real | Timestep used in stiffness calc |
| edgek | real | Scale factor for penalty stiffness of edge-to-edge contact |
| flangl | real | Angle tolerance in radians for feature lines option in smooth contact |
| igap | integer | Implicit convergence flag |
| ignore | integer | Ignore initial pens in automatic types |
| Name | Type | Description |
| shloff | real | Flag affecting the location of the contact surfaces. |
Detailed DescriptionThe Contact class allows you to create, modify, edit and contact cards. See the documentation below for more details. |
Constructornew Contact(Model[Model], type[string], id (optional)[integer], heading (optional)[string])DescriptionCreate a new Contact object. |
Model that Contact will be created in
Type of contact
Contact number
Title for the Contact
ReturnsContact object Return typeContact |
ExampleTo create a new AUTOMATIC_GENERIC contact n model m with label 10 and title "Test contact" var c = new Contact(m, "AUTOMATIC_GENERAL", 10, "Test contact");
|
Details of functionsAssociateComment(Comment[Comment])DescriptionAssociates a comment with a contact. |
Comment that will be attached to the contact
ReturnsNo return value |
ExampleTo associate comment c to the contact c: c.AssociateComment(c);
|
Blank()DescriptionBlanks the contact |
No arguments
ReturnsNo return value |
ExampleTo blank contact c: c.Blank();
|
BlankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionBlanks all of the contacts in the model. |
Model that all contacts 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 contacts in model m: Contact.BlankAll(m);
|
BlankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionBlanks all of the flagged contacts in the model. |
Model that all the flagged contacts will be blanked in
Flag set on the contacts 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 contacts in model m flagged with f: Contact.BlankFlagged(m, f);
|
Blanked()DescriptionChecks if the contact is blanked or not. |
No arguments
Returnstrue if blanked, false if not. Return typeBoolean |
ExampleTo check if contact c is blanked: if (c.Blanked() ) do_something...
|
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 contact c: c.Browse();
|
ClearFlag(flag[Flag])DescriptionClears a flag on the contact. |
Flag to clear on the contact
ReturnsNo return value |
ExampleTo clear flag f for contact c: c.ClearFlag(f);
|
Constrained(connection (optional)[boolean])Descriptionsee if tied/spotweld contact uses constrained formulation |
if true will only consider contacts used for PRIMER connections. The default is false.
Returnslogical Return typeBoolean |
ExampleTo see if contact is of type tied and constrained c.Constrained(); |
Copy(range (optional)[boolean])DescriptionCopies the contact. The target include of the copied contact 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().
ReturnsContact object Return typeContact |
ExampleTo copy contact c into contact z: var z = c.Copy();
|
Create(Model[Model], modal (optional)[boolean]) [static]DescriptionStarts an interactive editing panel to create a contact |
Model that the contact 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.
ReturnsContact object (or null if not made). Return typeContact |
ExampleTo start creating a contact in model m: var c = Contact.Create(m);
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a contact. |
Comment that will be detached from the contact
ReturnsNo return value |
ExampleTo detach comment c from the contact c: c.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 contact c: c.Edit();
|
Error(message[string], details (optional)[string])DescriptionAdds an error for contact. 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 contact c: c.Error("My custom error");
|
ExtractColour()DescriptionExtracts the actual colour used for contact. |
No arguments
Returnscolour value (integer) Return typeNumber |
ExampleTo return the colour used for drawing contact c: var colour = c.ExtractColour();
|
FindInteractions() [deprecated]This function is deprecated in version 11.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. DescriptionUse Contact.Interactions() instead. |
No arguments
ReturnsNo return value |
First(Model[Model]) [static]DescriptionReturns the first contact in the model. |
Model to get first contact in
ReturnsContact object (or null if there are no contacts in the model). Return typeContact |
ExampleTo get the first contact in model m: var c = Contact.First(m);
|
FirstFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the first free contact label in the model. Also see Contact.LastFreeLabel(), Contact.NextFreeLabel() and Model.FirstFreeItemLabel(). |
Model to get first free contact 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).
ReturnsContact label. Return typeNumber |
ExampleTo get the first free contact label in model m: var label = Contact.FirstFreeLabel(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the contacts in the model with a defined flag. |
Model that all contacts will be flagged in
Flag to set on the contacts
ReturnsNo return value |
ExampleTo flag all of the contacts with flag f in model m: Contact.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the contact is flagged or not. |
Flag to test on the contact
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if contact 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 contact in the model. |
Model that all contacts are in
Function to call for each contact
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 Contact objects or properties for all of the contacts in a model in PRIMER. If the optional property argument is not given then an array of Contact objects is returned. If the property argument is given, that property value for each contact is returned in the array instead of a Contact object |
Model to get contacts from
Name for property to get for all contacts in the model
ReturnsArray of Contact objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a contact. |
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 contact c: var comm_array = c.GetComments();
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of Contact objects for all of the flagged contacts in a model in PRIMER If the optional property argument is not given then an array of Contact objects is returned. If the property argument is given, then that property value for each contact is returned in the array instead of a Contact object |
Model to get contacts from
Flag set on the contacts that you want to retrieve
Name for property to get for all flagged contacts in the model
ReturnsArray of Contact objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the Contact object for a contact ID. |
Model to find the contact in
number of the contact you want the Contact object for
ReturnsContact object (or null if contact does not exist). Return typeContact |
ExampleTo get the Contact object for contact 100 in model m var c = Contact.GetFromID(m, 100);
|
GetParameter(prop[string])DescriptionChecks if a Contact 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 Contact.ViewParameters() method and 'method chaining' (see the examples below). |
contact property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
What type of interactions to return. Can be bitwise code of Contact.PENETRATIONS to return penetrations and Contact.CROSSED_EDGES to return crossed edges. If omitted penetrations will be returned.
Returns |
Array of objects with the following properties:
| Name | Type | Description |
| end | Array of reals | End coordinate of intersection line (for Contact.CROSSED_EDGES) |
| ex | real | escape vector X component (for Contact.PENETRATIONS) |
| ey | real | escape vector Y component (for Contact.PENETRATIONS) |
| ez | real | escape vector Z component (for Contact.PENETRATIONS) |
| n1 | Node object | Node 1 of reference segment (for Contact.PENETRATIONS) |
| n2 | Node object | Node 2 of reference segment (for Contact.PENETRATIONS) |
| n3 | Node object | Node 3 of reference segment (for Contact.PENETRATIONS) |
| n4 | Node object | Node 4 of reference segment (for Contact.PENETRATIONS) |
| node | Node object | Penetrating node (for Contact.PENETRATIONS) |
| pen | real | Depth of penetration (for Contact.PENETRATIONS) |
| qthick | real | Remaining thickness ratio (for Contact.PENETRATIONS) |
| rthick | real | Remaining unpenetrated thickness (for Contact.PENETRATIONS) |
| s | real | s parametric coordinate of the tracked node projected onto the shell (for Contact.PENETRATIONS) |
| shell | Shell object | Penetrated shell (for Contact.PENETRATIONS) |
| shell1 | Shell object | First segment if shell (for Contact.CROSSED_EDGES) |
| shell2 | Shell object | Second segment if shell (for Contact.CROSSED_EDGES) |
| solid | Solid object | Penetrated solid (for Contact.PENETRATIONS) |
| solid1 | Solid object | First segment if solid (for Contact.CROSSED_EDGES) |
| solid2 | Solid object | Second segment if solid (for Contact.CROSSED_EDGES) |
| start | Array of reals | Start coordinate of intersection line (for Contact.CROSSED_EDGES) |
| t | real | t parametric coordinate of the tracked node projected onto the shell (for Contact.PENETRATIONS) |
| thick | real | Thickness of contact segment, i.e. 0.5*(t1+t2) (for Contact.PENETRATIONS) |
| thickshell | Tshell object | Penetrated thick shell (for Contact.PENETRATIONS) |
| thickshell1 | Tshell object | First segment if thick shell (for Contact.CROSSED_EDGES) |
| thickshell2 | Tshell object | Second segment if thick shell (for Contact.CROSSED_EDGES) |
| type | integer | The interaction type. Either Contact.PENETRATIONS or Contact.CROSSED_EDGES. |
object
Keyword()DescriptionReturns the keyword for this Contact (*BOUNDARY_PRESCRIBED_MOTION_xxxx). Note that a carriage return is not added. See also Contact.KeywordCards() |
No arguments
Returnsstring containing the keyword. Return typeString |
ExampleTo get the keyword for Contact c: var key = c.Keyword();
|
KeywordCards()DescriptionReturns the keyword cards for the Contact. Note that a carriage return is not added. See also Contact.Keyword() |
No arguments
Returnsstring containing the cards. Return typeString |
ExampleTo get the cards for Contact c: var cards = c.KeywordCards();
|
Last(Model[Model]) [static]DescriptionReturns the last contact in the model. |
Model to get last contact in
ReturnsContact object (or null if there are no contacts in the model). Return typeContact |
ExampleTo get the last contact in model m: var c = Contact.Last(m);
|
LastFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the last free contact label in the model. Also see Contact.FirstFreeLabel(), Contact.NextFreeLabel() and see Model.LastFreeItemLabel() |
Model to get last free contact 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.
ReturnsContact label. Return typeNumber |
ExampleTo get the last free contact label in model m: var label = Contact.LastFreeLabel(m);
|
Next()DescriptionReturns the next contact in the model. |
No arguments
ReturnsContact object (or null if there are no more contacts in the model). Return typeContact |
ExampleTo get the contact in model m after contact c: var c = c.Next();
|
NextFreeLabel(Model[Model], layer (optional)[Include number]) [static]DescriptionReturns the next free (highest+1) contact label in the model. Also see Contact.FirstFreeLabel(), Contact.LastFreeLabel() and Model.NextFreeItemLabel() |
Model to get next free contact 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).
ReturnsContact label. Return typeNumber |
ExampleTo get the next free contact label in model m: var label = Contact.NextFreeLabel(m);
|
PenCheck(flag[Flag], eflag[integer])DescriptionFlags nodes that penetrate (or tie) in contact |
Flag to be set on penetrating (or tied) node.
Optional flag for elements. If supplied, node will be flagged only if it penetrates (or ties to) an element that is flagged. Node and element flag may be the same.
Returnszero if contact successfully checked Return typeNumber |
ExampleTo set flag f on tracked nodes of Contact c which tie to elements flagged with f: c.PenCheck(f, f);
|
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.
Check mode. Can be Model.MPP_MODE or Model.SMP_MODE. Default is set to the oa pref contact_check_mode
Can set the MPP threshold, by default this is set to the oa pref contact_mpp_penetration_threshold
Can set the value of reporting crossed elements to TRUE or FALSE, by default this is set to the oa pref report_crossed_3d_elems
Duplicate shell treatment Can be Model.SHELL_AUTO, Model.SHELL_THICK or Model.SHELL_THIN. Default is set to the oa pref contact_penchk_dup_shells
ReturnsNo return value |
Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]DescriptionAllows the user to pick a contact. |
Text to display as a prompt to the user
If the argument is a Model then only contacts from that model can be picked. If the argument is a Flag then only contacts that are flagged with limit can be selected. If omitted, or null, any contacts 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.
ReturnsContact object (or null if not picked) Return typeContact |
ExampleTo pick a contact from model m giving the prompt 'Pick contact from screen': var c = Contact.Pick('Pick contact from screen', m);
|
Previous()DescriptionReturns the previous contact in the model. |
No arguments
ReturnsContact object (or null if there are no more contacts in the model). Return typeContact |
ExampleTo get the contact in model m before contact c: var c = c.Previous();
|
RenumberAll(Model[Model], start[integer]) [static]DescriptionRenumbers all of the contacts in the model. |
Model that all contacts will be renumbered in
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber all of the contacts in model m, from 1000000: Contact.RenumberAll(m, 1000000);
|
RenumberFlagged(Model[Model], flag[Flag], start[integer]) [static]DescriptionRenumbers all of the flagged contacts in the model. |
Model that all the flagged contacts will be renumbered in
Flag set on the contacts that you want to renumber
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber all of the contacts in model m flagged with f, from 1000000: Contact.RenumberFlagged(m, f, 1000000);
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select contacts using standard PRIMER object menus. |
Flag to use when selecting contacts
Text to display as a prompt to the user
If the argument is a Model then only contacts from that model can be selected. If the argument is a Flag then only contacts that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any contacts 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 contacts selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the contact. |
Flag to set on the contact
ReturnsNo return value |
ExampleTo set flag f for contact c: c.SetFlag(f);
|
Sketch(redraw (optional)[boolean])DescriptionSketches the contact. The contact will be sketched until you either call Contact.Unsketch(), Contact.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the contact is sketched. If omitted redraw is true. If you want to sketch several contacts and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch contact c: c.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged contacts in the model. The contacts will be sketched until you either call Contact.Unsketch(), Contact.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged contacts will be sketched in
Flag set on the contacts that you want to sketch
If model should be redrawn or not after the contacts are sketched. If omitted redraw is true. If you want to sketch flagged contacts several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all contacts flagged with flag in model m: Contact.SketchFlagged(m, flag);
|
StatusCheck()DescriptionChecks sliding contact for crossed edges and penetrations |
No arguments
ReturnsAn array containing count of crossed edges, count of penetrations (note if a node penetrates more than one segment, it is only reported once here) Return typeArray |
ExampleTo check Contact c: var status = c.StatusCheck(); ncrossed = status[0]; npens = status[1]
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of contacts in the model. |
Model to get total for
true if only existing contacts should be counted. If false or omitted referenced but undefined contacts will also be included in the total.
Returnsnumber of contacts Return typeNumber |
ExampleTo get the total number of contacts in model m: var total = Contact.Total(m);
|
Unblank()DescriptionUnblanks the contact |
No arguments
ReturnsNo return value |
ExampleTo unblank contact c: c.Unblank();
|
UnblankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the contacts in the model. |
Model that all contacts 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 contacts in model m: Contact.UnblankAll(m);
|
UnblankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the flagged contacts in the model. |
Model that the flagged contacts will be unblanked in
Flag set on the contacts 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 contacts in model m flagged with f: Contact.UnblankFlagged(m, f);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the contacts in the model. |
Model that the defined flag for all contacts will be unset in
Flag to unset on the contacts
ReturnsNo return value |
ExampleTo unset the flag f on all the contacts in model m: Contact.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the contact. |
If model should be redrawn or not after the contact is unsketched. If omitted redraw is true. If you want to unsketch several contacts and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch contact c: c.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all contacts. |
Model that all contacts will be unblanked in
If model should be redrawn or not after the contacts 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 contacts in model m: Contact.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged contacts in the model. |
Model that all contacts will be unsketched in
Flag set on the contacts that you want to unsketch
If model should be redrawn or not after the contacts 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 contacts flagged with flag in model m: Contact.UnsketchAll(m, flag);
|
No arguments
ReturnsContact object. Return typeContact |
ExampleTo check if Contact property c.example is a parameter by using the Contact.GetParameter() method: if (c.ViewParameters().GetParameter(c.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for contact. 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 contact c: c.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this contact. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for contact c: var xrefs = c.Xrefs();
|
toString()DescriptionCreates a string containing the Contact data in keyword format. Note that this contains the keyword header and the keyword cards. See also Contact.Keyword() and Contact.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for Contact c in keyword format var data = c.toString();
|