The Model class gives you access to models 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 |
| Model.ABAQUS | ABAQUS input file |
| Model.IGES | IGES 5.3 geometry file |
| Model.LSDYNA | Ansys LS-DYNA keyword file |
| Model.NASTRAN | NASTRAN bulk data file |
| Model.RADIOSS | RADIOSS block format file |
| Name | Type | Description |
| highest (read only) | integer | The highest model number present in PRIMER |
| Name | Type | Description |
| binary (read only) | boolean | If model is in binary then it will be 1(true) else 0(false). |
| comments | string | Comments stored at the top of the primary model file. |
| compress (read only) | boolean | If model is compressed then it will be 1(true) else 0(false). |
| compressMode (read only) | integer | This option can be used to know the mode of compression. Can be Model.INDIVIDUAL_GZIP or Model.INDIVIDUAL_ZIP or Model.PACKAGED_ZIP |
| control (read only) | Control object | Control cards for model. See Control for more details. |
| damping (read only) | Damping object | Damping cards for model. See Damping for more details. |
| database (read only) | Database object | Database cards for model. See Database for more details. |
| fileStartAscii (read only) | boolean | If the beginning of the master file (*CONTROL etc) is in ascii then 1(true) else 0(false)(NOTE: If master file is ascii then fileStartAscii won't be checked and show 0(false)). |
| filename (read only) | string | Name of file that model was read from (blank if model created) |
| id | logical | If ID flag set for *KEYWORD card |
| layer | integer | The current layer for the model. This is the label of the Include file or 0 for the main file. See also Include.MakeCurrentLayer() |
| loadBody (read only) | LoadBody object | LoadBody cards for model. See LoadBody for more details. |
| masterAscii (read only) | boolean | If master file is in ascii then 1(true) else 0(false). |
| num | string | Model num (for _ID) |
| number | integer | Model number |
| path (read only) | string | Path that model was read from (blank if model created) |
| project | string | Model project (for _ID) |
| readlog | string | Full path of the readlog file |
| stage | string | Model stage (for _ID) |
| title | string | Model title |
| visible | logical | Model visibility flag |
Constructornew Model(number (optional)[integer])DescriptionCreate a new model in PRIMER |
Model number to create. If omitted the next free model number will be used.
ReturnsModel object Return typeModel |
ExampleTo create a new model var m = new Model(); To create model 10 var m = new Model(10);
|
Details of functionsAreaVolumeFlagged(flag[Flag])DescriptionCalculates the Area/Volume of the selected items. |
Flag set on entities you wish to calculate area/volume for
Returns |
Object with the following properties:
| Name | Type | Description |
| area | real | Area of flagged items |
| volume | real | Volume of flagged items |
object
ExampleTo calculate the area/volume properties of the items flagged by flag f. var props = m.AreaVolumeFlagged(f); var area = props.area; var volume = props.volume;
|
Attached(flag[Flag], redraw (optional)[boolean])DescriptionFinds attached items to flagged items. The attached items are flagged with the same flag. |
Flag set on items that you want to find attached to
If true, the display will be updated to display only the original flagged items and the attached items.
ReturnsNo return value |
ExampleTo find items attached to items flagged with flag f in model m: m.Attached(f);
|
Autofix()DescriptionAutofix option does a model check and autofixes all the fixable errors in the model |
No arguments
ReturnsNo return value |
ExampleTo autofix fixable errors of the model 'm' m.Autofix();
|
Blank()DescriptionBlanks a model in PRIMER |
No arguments
ReturnsNo return value |
ExampleTo blank model object m m.Blank();
|
BlankAll() [static]DescriptionBlanks all models |
No arguments
ReturnsNo return value |
ExampleTo blank all models Model.BlankAll();
|
BlankFlagged(flag[Flag], redraw (optional)[boolean])DescriptionBlanks all of the flagged items in the model. |
Flag set on items 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 everything in model m flagged with flag f: m.BlankFlagged(f);
|
CentreOfGravity()DescriptionReturns the centre of gravity for a model |
No arguments
ReturnsAn array containing the x, y and z coordinates for the CofG. Return typeArray |
ExampleTo get the centre of gravity for model m: var cofg = m.CentreOfGravity(); var x = cofg[0]; var y = cofg[1]; var z = cofg[2];
|
Check(filename[string], detailed (optional)[boolean], json (optional)[boolean], include (optional)[boolean])DescriptionChecks a model, writing any errors to file. |
Name of file to write errors to
If set to "true", detailed error messages are given.
If set, output in filename will be written in JSON format. If omitted json will be set to false. If JSON format is written then detailed will automatically be set. Note that when writing JSON format the labels produced can be strings instead of integers in some rare cases. If you are writing a script to read a JSON file, it must be able to cope with this. Specifically if the item is a character label the label will be a string. For child collect sets the label will be a string of the format 'X_Y' where X is the parent set label and Y will be the child set number (1, 2, 3 ...). In this case use Set.GetCollectChild() to get the object.
If set, error messages will be written in include by include layout. This option is not applicable if JSON is set.
ReturnsNo return value |
ClearFlag(flag[Flag])DescriptionClears the flagging for a model in PRIMER. See also Model.PropagateFlag(), Model.SetFlag(), global.AllocateFlag() and global.ReturnFlag(). |
Flag to clear
ReturnsNo return value |
ExampleTo clear flag f for everything in model m: m.ClearFlag(f);
|
Copy(update (optional)[boolean])DescriptionCopy model to the next free model in PRIMER |
If the graphics should be updated after the model is copied. If omitted update will be set to false
ReturnsModel object for new model. Return typeModel |
ExampleTo copy model m to the next free model in PRIMER. var mnew = m.Copy();
|
CopyFlagged(flag[Flag], update (optional)[boolean])DescriptionCopy flagged items in a model to the next free model in PRIMER |
Flag set on items that you want to copy
If the graphics should be updated after the model is copied. If omitted update will be set to false
ReturnsModel object for new model. Return typeModel |
ExampleTo copy everything in model m flagged with flag f to the next free model in PRIMER. var mnew = m.CopyFlagged(f);
|
Delete()DescriptionDeletes a model in PRIMER |
No arguments
ReturnsNo return value |
ExampleTo delete model m in PRIMER m.Delete();
|
DeleteAll() [static]DescriptionDeletes all existing models from PRIMER |
No arguments
ReturnsNo return value |
ExampleTo delete all models Model.DeleteAll();
|
DeleteFlagged(flag[Flag], recursive (optional)[boolean])DescriptionDeletes all of the flagged items in the model. Note that this may not actually delete all of the items. For example if a node is flagged but the node is used in a shell which is not flagged then the node will not be deleted. |
Flag set on items that you want to delete
If deletion is recursive (for example, if a shell is deleted with recursion on the shell nodes will be deleted if possible). If omitted recursive will be set to true.
ReturnsNo return value |
ExampleTo delete everything in model m flagged with flag f: m.DeleteFlagged(f);
|
DeleteInclude(Include label[integer], method (optional)[constant], force (optional)[boolean])DescriptionTries to delete an include file from the model. Note that this may not actually delete the include file. For example if some of the items in the include file are required by other things in different includes then the include file will not be deleted. |
label of include file that you want to delete
Method for deleting items. Must be Model.REMOVE_FROM_SETS (default),
Model.REMOVE_JUNIOR or
Model.REMOVE_INCLUDE_ONLY.
Model.REMOVE_FROM_SETS will only delete items within
the include selected but may remove items from sets in other includes.
Model.REMOVE_JUNIOR may delete items in other includes
- this will happen if they 'belong' to items in this include and are considered 'junior'
Model.REMOVE_INCLUDE_ONLY does the same as
Model.REMOVE_FROM_SETS but will not remove
items from sets in other includes.
Forcible deletion option (for example, a node is deleted even when it is referenced by a shell which is not deleted). This will remove the include file (not just the contents) from the model. If this argument is omitted, force will be set to false.
Returnstrue if include successfully deleted, false otherwise Return typeBoolean |
ExampleTo delete include file number 5 in model m removing items from sets in other includes if required: m.DeleteInclude(5, 1);
|
FindElemEnd() [deprecated]This function is deprecated in version 20.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. DescriptionTidy internal flag used by functions which find elements within a box. This function is only required if there has been a previous call to Model.FindElemInit() with a flag defined. This usage is deprecated for v20.0 where the flag should be applied in Beam.FindBeamInBox() Shell.FindShellInBox() Solid.FindSolidInBox() Tshell.FindTShellInBox() and there is no need to use FindElemInit or FindElemEnd |
No arguments
ReturnsNo return value |
Example
m.FindElemEnd();
|
FindElemInit(flag (optional)[Flag]) [deprecated]This function is deprecated in version 20.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. DescriptionIn v20.0 this function is obsolete. FindXXXInBox() is called without it. Refinement of element selection is now done with optional flagging argument in Beam.FindBeamInBox() Shell.FindShellInBox() Solid.FindSolidInBox() Tshell.FindTShellInBox() If you do use this function with flagging bit (not recommended), PRIMER copies flagging to another allocated flag, so you will need on completion to call FindElemEnd() to return this flag. |
Optional flag that has been set on the elements, if 0 all elements considered
ReturnsNo return value |
ExampleTo initialize find setup for flagged elements in model m: m.FindElemInit(flag);
|
First() [static]DescriptionReturns the Model object for the first model in PRIMER (or null if there are no models) |
No arguments
ReturnsModel object Return typeModel |
ExampleTo get the Model object for the first model: var m = Model.First();
|
FirstFreeItemLabel(type[string], layer (optional)[Include number]) [static]DescriptionReturns the first free label for an item type in the model. Also see Model.LastFreeItemLabel() and Model.NextFreeItemLabel(). |
The type of the item (for a list of types see Appendix I of the PRIMER manual).
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).
Returnsinteger Return typeNumber |
ExampleTo get the first free node label in model m: var label = m.FirstFreeItemLabel("NODE");
|
FlagDuplicate(flag[Flag])DescriptionFlag all nodes referenced in two different includes |
Flag which will be used to flag the "duplicate" nodes
ReturnsNo return value |
ExampleTo Flag with flag f all the nodes referenced in different includes from model m m.FlagDuplicate(f);
|
Flagged(flag[Flag])DescriptionChecks if the model is flagged or not |
Flag to test on the model
Returnstrue if flagged, false if not Return typeBoolean |
ExampleTo check if model m has flag f set on it: if (m.Flagged(f) ) do_something...
|
GetAll() [static]DescriptionReturns an array of Model objects for all the models in PRIMER |
No arguments
ReturnsArray of Model objects Return typeArray |
ExampleTo make an array of Model objects for all of the models in PRIMER var m = Model.GetAll();
|
GetFromID(model number[integer]) [static]DescriptionReturns the Model object for a model ID or null if model does not exist |
number of the model you want the Model object for
ReturnsModel object Return typeModel |
ExampleTo get the Model object for model number 1 var m = Model.GetFromID(1);
|
GetIncludeTransformOffsets()DescriptionLooks at all of the items in the model and determines values for IDNOFF, IDEOFF, IDPOFF etc that could be used with Model.ImportIncludeTransform to guarantee that there would not be any clashes with existing items in the model. |
No arguments
Returns |
Object with the following properties:
| Name | Type | Description |
| iddoff | integer | Offset to define id |
| ideoff | integer | Offset to element id |
| idfoff | integer | Offset to function id |
| idmoff | integer | Offset to material id |
| idnoff | integer | Offset to node id |
| idpoff | integer | Offset to part id |
| idroff | integer | Offset to section, hourglass, EOS id |
| idsoff | integer | Offset to set id |
object
Hide()DescriptionHides a model in PRIMER |
No arguments
ReturnsNo return value |
ExampleTo hide model m in PRIMER m.Hide();
|
Filename of the Ansys LS-DYNA keyword file you want to import
Returns0: No errors/warnings. Return typeNumber |
ExampleTo import file "test.key" into model m m.Import("test.key");
|
ImportInclude(source[String OR Include Object], target (optional)[Include Object])DescriptionImports a keyword file or an Include object from different model as a new include or into an existing include file for model m. The labels of any items in the imported include contents that clash with existing labels will automatically be renumbered with one exception. The behaviour for *SET_COLLECT cards can be controlled with Options.merge_set_collect. |
Can either be a Filename of the Ansys LS-DYNA include file you want to import, OR Include object of another model you want to import
Include file object of current model if the Import has to be done in an existing include.
If not using this argument the contents of the source will be imported as a new include.
If using this argument the contents of the source will NOT be imported as a new include, they will be merged with the target include.
Note: Target cannot be include number 0 (it must be an include file, not the master file)
ReturnsInclude object for include file Return typeInclude |
Filename of the Ansys LS-DYNA include file you want to import
Offset for nodes in the file
Offset for elements in the file
Offset for parts in the file
Offset for materials in the file
Offset for sets in the file
Offset for functions and tables in the file
Offset for defines in the file
Offset for other labels in the file
ReturnsInclude object if successful, null if not Return typeInclude |
ExampleTo import include transform file "include.key" into model m using 1000 for all offsets m.ImportIncludeTransform("include.key", 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000);
|
Last() [static]DescriptionReturns the Model object for the last model in PRIMER (or null if there are no models) |
No arguments
ReturnsModel object Return typeModel |
ExampleTo get the Model object for the last model: var m = Model.Last();
|
LastFreeItemLabel(type[string], layer (optional)[Include number]) [static]DescriptionReturns the last free label for an item type in the model. Also see Model.FirstFreeItemLabel() and Model.NextFreeItemLabel(). |
The type of the item (for a list of types see Appendix I of the PRIMER manual).
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.
Returnsinteger Return typeNumber |
ExampleTo get the last free node label in model m: var label = m.LastFreeItemLabel("NODE");
|
Mass()DescriptionReturns the mass for a model |
No arguments
Returnsreal Return typeNumber |
ExampleTo get the mass for model m: var mass = m.Mass();
|
MassPropCalc(flag[Flag])DescriptionCalculates the Mass, CoG, and Intertia Tensor of the flagged items and returns an object with the above properties. See Properties for mass properties calculation under options class to configure inclusion of lumped mass, etc. |
Calculate mass propetries of flagged items
Returns |
Object with the following properties:
| Name | Type | Description |
| cofgx | real | X coordinate of centre of gravity |
| cofgy | real | Y coordinate of centre of gravity |
| cofgz | real | Z coordinate of centre of gravity |
| inerxx | real | XX inertia |
| inerxy | real | XY inertia |
| inerxz | real | XZ inertia |
| ineryy | real | YY inertia |
| ineryz | real | YZ inertia |
| inerzz | real | ZZ inertia |
| mass | real | Mass |
object
ExampleTo calculate the mass properties of the items flagged by flag f var props = m.MassPropCalc(f);
|
Merge(Primary Model[Model], Secondary Model[Model], Option to fix clashes (optional)[constant], Merge nodes flag (optional)[boolean], dist (required if merge nodes flag used) (optional)[real], label (optional)[integer], position (optional)[integer]) [static]DescriptionMerge 2 models together to make a new model. |
Primary Model for merge.
Secondary Model for merge.
Type of fix. Can be Model.INCREASE_SECONDARY_ALWAYS, Model.INCREASE_SECONDARY_CLASH, Model.DISCARD_SECONDARY_CLASH, Model.INCREASE_PRIMARY_ALWAYS, Model.INCREASE_PRIMARY_CLASH or Model.DISCARD_PRIMARY_CLASH
If this flag is set to true, PRIMER will merge nodes after the model merge.
Nodes closer than dist will be potentially merged.
Label to keep after merge. If > 0 then highest label kept. If <= 0 then lowest kept. If omitted the lowest label will be kept.
Position to merge at. If > 0 then merged at highest label position. If < 0 then merged at lowest label position. If 0 then merged at midpoint. If omitted the merge will be done at the lowest label.
ReturnsModel object (or null if the merge is unsuccessful) Return typeModel |
ExampleTo merge models m1 and m2 together: var m = Model.Merge(m1, m2);
|
MergeNodes(flag[Flag], dist[real], label (optional)[integer], position (optional)[integer])DescriptionAttempts to merge nodes on items flagged with flag for this model in PRIMER. Merging nodes on *AIRBAG_SHELL_REFERENCE_GEOMETRY can be controlled by using Options.node_replace_asrg. Also see Node.Merge(). |
Flag set on items to merge nodes
Nodes closer than dist will be potentially merged.
Label to keep after merge. If > 0 then highest label kept. If <= 0 then lowest kept. If omitted the lowest label will be kept.
Position to merge at. If > 0 then merged at highest label position. If < 0 then merged at lowest label position. If 0 then merged at midpoint. If omitted the merge will be done at the lowest label.
ReturnsThe number of nodes merged Return typeNumber |
ExampleTo (try to) merge nodes on everything in model m flagged with flag f, with a distance of 0.1: m.MergeNodes(f, 0.1);
|
NextFreeItemLabel(type[string], layer (optional)[Include number]) [static]DescriptionReturns the next free label for an item type in the model. Also see Model.FirstFreeItemLabel() and Model.LastFreeItemLabel(). |
The type of the item (for a list of types see Appendix I of the PRIMER manual).
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).
Returnsinteger Return typeNumber |
ExampleTo get the next free node label in model m: var label = m.NextFreeItemLabel("NODE");
|
PopulateInitialVelocities()DescriptionPopulate the initial velocity field (nvels) for all nodes of the model |
No arguments
ReturnsNo return value |
Example
m.PopulateInitialVelocities();
|
PropagateFlag(flag[Flag])DescriptionPropagates the flagging for a model in PRIMER. For example if a part in the model is flagged, this will flag the elements in the part, the nodes on those elements... See also Model.ClearFlag(), Model.SetFlag(), global.AllocateFlag() and global.ReturnFlag(). |
Flag to propagate
ReturnsNo return value |
ExampleTo propagate the flagging in model m for flag f m.PropagateFlag(f);
|
Read(filename[string], filetype (optional)[constant], number (optional)[integer]) [static]DescriptionReads a file into the first free model in PRIMER |
Filename you want to read
Filetype you want to read. Can be Model.LSDYNA, Model.ABAQUS, Model.NASTRAN, Model.RADIOSS or Model.IGES. If omitted the file is assumed to be a DYNA3D file. For Model.NASTRAN there are options that change how the model is read. See Options for details.
Model number to read file into. If omitted the next free model number will be used.
ReturnsModel object (or null if error) Return typeModel |
RenumberAll(start[integer])DescriptionRenumbers all of the items in the model. |
Start point for renumbering
ReturnsNo return value |
ExampleTo renumber everything in model m, starting at 1000000: m.RenumberAll(1000000);
|
RenumberFlagged(flag[Flag], start[integer], mode (optional)[constant])DescriptionRenumbers all of the flagged items in the model. |
Flag set on items that you want to renumber
Start point for renumbering
Renumber mode. Can be Model.IGNORE_CLASH, Model.MOVE_CLASH_UP, Model.SHIFT_ALL_UP, or Model.RENUMBER_TO_FREE (default),
ReturnsNo return value |
ExampleTo renumber everything in model m flagged with flag f, starting at 1000000, using mode MOVE_CLASH_UP: m.RenumberFlagged(f, 1000000, Model.MOVE_CLASH_UP);
|
Text to display as a prompt to the user
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.
ReturnsModel object (or null if no models present). Return typeModel |
ExampleTo select a model giving the prompt 'Select model': var m = Model.Select('Select model');
|
SetColour(colour[colour from Colour class.])DescriptionSets the colour of the model. |
The colour you want to set the model to
ReturnsNo return value |
ExampleTo set the colour of model m to red: m.SetColour(Colour.RED); or m.SetColour(Colour.RGB(255, 0, 0));
|
SetFlag(flag[Flag])DescriptionSets the flagging for a model in PRIMER. See also Model.PropagateFlag(), Model.ClearFlag(), global.AllocateFlag() and global.ReturnFlag(). |
Flag to set
ReturnsNo return value |
ExampleTo set flag f for everything in model m: m.SetFlag(f);
|
Show()DescriptionShows a model in PRIMER |
No arguments
ReturnsNo return value |
ExampleTo show model m in PRIMER m.Show();
|
Total() [static]DescriptionReturns the total number of models. |
No arguments
Returnsinteger Return typeNumber |
ExampleTo find how many models there are in PRIMER: var num = Model.Total();
|
Unblank()DescriptionUnblanks a model in PRIMER |
No arguments
ReturnsNo return value |
ExampleTo unblank model m m.Unblank();
|
UnblankAll() [static]DescriptionUnblanks all models |
No arguments
ReturnsNo return value |
ExampleTo unblank all models Model.UnblankAll();
|
UnblankFlagged(flag[Flag], redraw (optional)[boolean])DescriptionUnblanks all of the flagged items in the model. |
Flag set on items 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 everything in model m flagged with flag f: m.UnblankFlagged(f);
|
UnsketchAll(redraw (optional)[boolean])DescriptionUnsketches all of the sketched items in the model. |
If model should be redrawn or not after the items 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 the sketched objects in model m: m.UnsketchAll();
|
UpdateGraphics()DescriptionUpdates the graphics for a model in PRIMER |
No arguments
ReturnsNo return value |
ExampleTo update the graphics for model m m.UpdateGraphics();
|
UsesLargeLabels()DescriptionChecks to see if a model uses large labels |
No arguments
Returnslogical, true if model uses large labels, false otherwise Return typeBoolean |
ExampleTo check if model m uses large labels: var large = m.UsesLargeLabels();
|
Write(filename[string], options (optional)[object])DescriptionWrites a model in PRIMER to file |
Filename of the Ansys LS-DYNA keyword file you want to write
Options specifying how the file should be written out. If omitted the default values below will be used. The properties available are:
Object has the following properties:
| Name | Type | Description |
| binary (optional) | boolean | If true then the entire output file will be written out in binary, if false then the entire file will be written in ascii. If not defined the default is for each file in the model to be written in its original format, or if this is a newly created model ascii will be used. |
| compress (optional) | boolean | If true then the output file will be compressed. If false (default) then an uncompressed file will be written. |
| compressLevel (optional) | integer | Compression level for .gz and .zip files. Must be in the range 1 to 9 with 1 being the least compression (fastest speed) to 9 being the greatest compression (slowest speed) |
| compressMode (optional) | integer | This option can be used to specify the mode of compression. Can be Include.KEEP_ORIGINAL or Include.INDIVIDUAL_GZIP or Include.INDIVIDUAL_ZIP |
| fileStartAscii (optional) | boolean | Only relevant if binary output format has been selected. If true then the beginning of the file (*CONTROL etc) file is written out in ascii. If false (default) then the entire file is converted to binary. |
| i10 (optional) | boolean | If true then i10 format will be used to write the file. If false (default) then the original Ansys LS-DYNA format in which the file was written will be used, or if this is a newly created model the smallest format which will contain it will be used. Note that large format is only available from version R9 and above. See also the large property. |
| kbyExt (optional) | boolean | If true then a binary format output file will be given the extension .kby, replacing the existing extension. |
| large (optional) | boolean | If true then large format will be used to write the file. If false (default) then the normal Ansys LS-DYNA format will be used. Note that large format is only available from version R7.1 and above. |
| masterAscii (optional) | boolean | Only relevant if binary output format has been selected. If true then the whole master file is written out in ascii. If false (default) then the master file is also converted to binary. |
| method (optional) | integer | The method used to write include files. Can be Include.MASTER_ONLY, Include.MERGE, Include.NOT_WRITTEN, Include.SUBDIR (default) or Include.SAME_DIR |
| parametersAsValues (optional) | boolean | If true then the underlying values of any parameters will be written when they are used in data fields rather than '&name'. If false then '&name' will be written. See also Options.keyout_parameter_values |
| path (optional) | integer | The method used to write include paths. Can be Include.ABSOLUTE (default) or Include.RELATIVE |
| separator (optional) | integer | The directory separator used when writing include files. Can be Include.NATIVE (default), Include.UNIX or Include.WINDOWS |
| version (optional) | string | The Ansys LS-DYNA version used to write the file. Can be "971R5", "971R4", "971R3", "970v6763" etc (see the version popup in Model->Write '>>> Ansys LS-DYNA output options' for a full list). See also Options.dyna_version |
ReturnsNo return value |
Filename of the Ansys LS-DYNA keyword file you want to write
The method used to write include files. Can be Include.MASTER_ONLY, Include.MERGE, Include.NOT_WRITTEN, Include.SUBDIR (default) or Include.SAME_DIR
The method used to write include paths. Can be Include.ABSOLUTE (default) or Include.RELATIVE
The directory separator used when writing include files. Can be Include.NATIVE (default), Include.UNIX or Include.WINDOWS
The Ansys LS-DYNA version used to write the file. Can be "971R5", "971R4", "971R3", "970v6763" etc (see the version popup in Model->Write '>>> Ansys LS-DYNA output options' for a full list). See also Options.dyna_version
If true then large format will be used to write the file. If false (default) then the original Ansys LS-DYNA format in which the file was written will be used, or if this is a newly created model the smallest format which will contain it will be used. Note that large format is only available from version R7.1 and above. See also the i10 property.
ReturnsNo return value |
ExampleTo Write model m to file /data/test/file.key m.Write("/data/test/file.key");
|