Saving and Reloading User-Defined Components
Saving and reloading user-defined components
All types of user-defined component described above can be saved in a "User Component File" called "d3plot.ucf" using the button, which will save the current component in the file for future reuse.
Likewise will present a menu of components found in the "d3plot.ucf" file, and choosing one will import its settings for the component you are currently editing or creating.
Save
component Saving the current component to file
When you the current component you are asked to choose:
-
Which file(s) to save it in.
OA_INSTALL is your Oasys Suite installation directory.
OA_HOME is your home directory.
<cwd> is the current working directory.
The component will be saved in all files selected for which you have write permission.
-
determines what
happens if the name of the component to be stored matches one already
in the file.
If you choose to overwrite then the original component in the file will be overwritten with the new definition.
Otherwise the current component's name will be added to the file, with its name modified by adding the suffix #1 (or #2, ...) to make it unique.
Name comparison is not case-sensitive, but does consider embedded white space. For example:
" My beam component " is treated as being identical to " MY BEAM COMPONENT "

Reload saved Reloading a component from disk to the current definition
When you choose to the various "d3plot.ucf" files are scanned for components that match the current type, and these are listed in a menu for selection.
In this example the user is using a Simple Formula to define a solid/shell tensor, and there are three components to choose from.
Note that the component "My SoSh tensor #1" has been stored multiple times, and, because was not used, the subsequent definitions have had the digit on the end incremented to make their names unique. (This is because D3PLOT requires components to have unique names, otherwise its internal parsing of components by name can get confused).
Automatic reloading of user-defined components
When D3PLOT starts it automatically scans any "d3plot.ucf" files and loads any " unique " components, meaning that saved user-defined components automatically become available in a new session.
On start-up it scans the following directories:
| OA_INSTALL | Typically where the software is installed, and suitable for system-wide components. You may not have write permission to this directory |
| OA_HOME | Your home directory. This would be suitable for components you want to use for a range of projects. |
| <cwd> (Current working directory) |
The location of this varies:
|
In addition whenever a new model is opened any "d3plot.ucf" file in that model's directory is scanned, and any "unique" components are loaded.
Definition of a "unique" component
A component is deemed to be "unique" if :
-
Its name does not match any currently stored component (including "built-in"
and
UBIN
components).
As explained above name matching is not case sensitive, but does consider embedded white space.
and
-
Its data row(s) do not match stored data rows(s)
FILE and JAVA script filename comparisons are made verbatim.
FORM ulae matching ignores both case and embedded white space. (i.e. the formulae are compressed to remove any white space before testing for matches)
If a component read from file is found not to be unique, i.e. it has already been read and stored, then it is ignored. In this way multiple reads of the same file, or the presence of a formula in more than one file, will not result in multiple definitions being read and stored.
If a component name matches, but its content (data rows) does not, then it is read in and its name has "#1", "#2", etc. added to make it unique.
The Format of the "d3plot.ucf" file
Components are saved in the generic format:
| <Type> <Source> <Name> | <Type> is one of |
NODE_SCALAR
SOSH_SCALAR BEAM_SCALAR OTHR_SCALAR |
NODE_VECTOR
BEAM_VECTOR OTHR_VECTOR |
SOSH_TENSOR
OTHR_TENSOR |
| <Source> is one of |
FILE
FORM (ula) JAVA (script) |
|||
| <Name> | Is a user-defined name up to 30 characters long | |||
|
<Definition row #1>
|
For FILE a single row | A filename up to 256 characters long | ||
|
For
FORM
1, 3 or 6 formulae. Each
on a new line, and each up to 256 characters long. |
xxxx_SCALAR
xxxx_VECTOR xxxx_TENSOR |
one formula
|
<scalar>
<x, y, z> <xx,yy,zz,xy,yz,zx> |
|
| For JAVA script a single row | A filename up to 256 characters long | |||
|
The file is free-format ASCII (text) and is not case sensitive.
The only exception is that on Unix/Linux systems filenames are case-sensitive and they will be stored exactly as they have been defined. The file may be hand-edited using a normal text editor. It will also be updated by the and options described above. |
||||
|
Here is an example of a typical file
$ Example file, created for user manual 1/11/2007
NODE_VECTOR FILE Example of nodal vector file
NODE_SCALAR FORM Example of scalar node form
BEAM_VECTOR FORM Example of vector beam form
SOSH_TENSOR FORM Example of elem tensor form
BEAM_SCALAR JAVA Example of beam scalar Java
|
||||