pw:: Application

Global actions of the application

Derives From

pw::Object

Summary
Global actions of the application
This action gets the program and version of the application.
This action checks if loading the given file would result in duplicate named entities.
This action checks if loading the given file would result in missing references.
This action checks for the number of unsupported entities that will be ignored or deleted if the file is loaded.
This action loads the entities and settings from the native file.
This action saves the current entities and settings to the native file format.
This action checks if the entities or settings have been modified since the last save.
This action resets the flags that track whether or not modifications have occurred.
This action checks if there are no entities.
This action begins a mode in the application.
This action sets the given list of entities to be the contents of the application clipboard.
Clear the contents of the application clipboard.
This action checks if the application clipboard contains any entities.
This action returns the number of items explicitly copied to the clipboard.
Reset the settings of the application
This action gets the names of the available CAE solvers.
This action gets the existing entities unsupported by a CAE solver and dimension.
This action determines if the given dimension is supported by a CAE solver.
This action determines if the given element type is supported by a CAE solver.
This action determines if the given element topology type is supported by a CAE solver.
This action sets the current CAE solver.
This action gets the name of the current CAE solver.
This action sets the current CAE solver dimension.
This action gets the dimension of the current CAE solver.
This action returns whether settable variables are supported by the current CAE solver.
This action gets the available CAE solver attribute names.
This action gets the named CAE solver attribute.
This action sets the named CAE solver attribute.
This action adds the named attribute to the current CAE solver.
This action gets the definition of a CAE solver attribute.
This action sets the current overset assembler.
This action gets the name of the current overset assembler.
This action gets the names of the available overset assemblers.
This action determines if the given dimension is supported by an overset assembler.
This action gets the named overset assembler attribute.
This action exports CAE data in a format specific to the currently selected analysis software.
This action gets the 3D position of the given point or grid coordinate.
This action combines two points or grid coordinates in different ways.
This action gets the entity of the given point or grid coordinate.
This action gets the description of the given point or grid coordinate.
This action returns the list of undo levels available.
This action returns the list of redo levels available.
This action undoes one step.
This action resets the undo levels.
This action redoes one step.
This action saves an undo checkpoint.
This action shuts down the full application immediately, with out any prompts to the user to warn about unsaved data.
Check to see if the script is being run from within the Pointwise application as opposed to being run in a Tcl batch interpreter.
This sets/gets the maximum number of undo levels maintained.
This attribute is the grid preference of the application.
This gets the extensions of files exported for the CAE solver.
This gets the type of file destination that is expected by the current CAE when calling the <pw::Application export> command.
This gets the allowed file formats when exporting for the CAE solver.
This gets the allowed data precision when exporting for the CAE solver.
This gets the allowed file byte order when exporting for the CAE solver.
This gets a boolean flag that indicates whether the CAE solver allows export of the conditions data without having to export the grid data.
This returns a boolean flag that indicates whether the CAE solver supports the volume conditions.
This gets the method used for the implementation of the exporter.
This returns a boolean flag that indicates whether the CAE solver supports setting an export mirror plane.
This gets a list of the element types supported by the CAE solver.
This gets a list of the element topologies supported by the CAE solver.
This gets the flag that indicates whether the current overset assembler allows overset grid assembly.
This gets the flag that indicates whether the current overset assembler allows boundary conditions.
This gets the flag that indicates whether the current overset assembler allows volume conditions.
This gets the flag that indicates whether the current overset assembler allows collar boundary conditions.

Static Actions

getVersion

pw::Application getVersion

This action gets the program and version of the application.

Parameters

None

Returns

This action returns a string describing the version of the application.

Example

Code

pw::Application getVersion

Output

Pointwise V16.04R1

checkForDuplicates

pw::Application checkForDuplicates ?-rules ruleVar? filename

This action checks if loading the given file would result in duplicate named entities.

Parameters

ruleVarThis parameter is the variable name to store the boolean result when checking for duplicate rules.  For rules, a duplicate is defined as a pair of rules that either have the same function and operand but different values, or have the same function but conflicting operands and values.
filenameThis parameter is the full path and name string of the file to load.

Returns

This action returns a boolean, which is true if there are duplicates.

Information

This command supports progress updates.

Example

Code

pw::Application checkForDuplicates -rules result "C:\test.pw"
puts $result

Output

1
0

checkForMissingReferences

pw::Application checkForMissingReferences ?-local? filename

This action checks if loading the given file would result in missing references.

Parameters

-localThis optional flag is a notification that only entities within the file will be considered for satisfying references.
filenameThis paramenter is the full path and name string of the file to load.

Returns

This action returns a boolean, which is true if there are missing references.

Information

This command supports progress updates.

Example

Code

pw::Application checkForMissingReferences "C:\test.pw"

Output

0

checkCAEUnsupportedEntities

pw::Application checkCAEUnsupportedEntities ?-ignoreCAESolver? fileName

This action checks for the number of unsupported entities that will be ignored or deleted if the file is loaded.

Parameters

-ignoreCAESolverThis optional flag is a notification to not use CAE Solver settings from the file.
fileNameThis parameter is the full path and name string of the file to load.

Returns

This action returns the number of unsupported entities.

Information

If you have -ignoreCAESolver it gets the number of ents in the file that are not supported by the current CAE solver and dimension, and if you don’t have the flag, it gets the number of existing ents that are not supported by the file’s CAE solver and dimension.

Example

Code

pw::Application checkCAEUnsupportedEntities -ignoreCAESolver "C:\test.pw"

Output

2

load

pw::Application load ?-ignoreCAESolver? ?-environment? ?-rules < KeepOld | KeepNew | KeepBoth >? filename

This action loads the entities and settings from the native file.

Parameters

-ignoreCAESolverThis optional flag is a notification to not use CAE Solver settings from the file.
-environmentThis optional flag loads a file’s environment.  File settings are loaded (e.g. defaults, views, rules, etc.), but grid and database entities are not loaded.
-rules optionThis optional parameter controls which set of rules are kept.  If option is KeepOld, the rules in the file are discarded.  If option is KeepNew, the rules in the file replace the existing rules.  If option is KeepBoth, both sets of rules are kept which may lead to conflicting or duplicate rules that will have to be sorted out manually.  The default option is KeepOld.  If there are no rules in the current project, then the KeepNew option is used regardless of the specified option.
filenameThis parameter is the full path and name string of the file to load.

Returns

This action returns nothing.

Information

This command supports progress updates.

Example

Code

pw::Application load -rules KeepNew "C:\test.pw"

save

pw::Application save ?-compress level? ?-noOverwrite? ?< -entities ents | -environment >? filename

This action saves the current entities and settings to the native file format.

Parameters

-compress levelThis optional parameter sets the integer file compression level; [0, 9], default 0.
-noOverwriteThis optional flag is a notification to not save if filename already exists.
-entitiesAn optional list of entities to be saved.  Only the specified entities and any entities on which they depend are saved.
-environmentThis optional flag saves the the current environment.  File settings are saved (e.g. defaults, views, rules, etc.), but grid and database entities are not saved.
filenameThis parameter is the full path and name string of the file to save.

Returns

This action returns nothing.

Information

This command supports progress updates.

For “-compress level”, 0 = no compression, 1 = minimum, and 9 = maximum.  Higher levels of compression take longer to save.

Example

Code

pw::Application save -noOverwrite "test.pw"

isModified

pw::Application isModified

This action checks if the entities or settings have been modified since the last save.

Parameters

None

Returns

This action returns a boolean, which is true if there have been modifications.

Example

Code

pw::Application isModified

Output

1

clearModified

pw::Application clearModified

This action resets the flags that track whether or not modifications have occurred.

Parameters

None

Returns

This action returns nothing.

isEmpty

pw::Application isEmpty

This action checks if there are no entities.

Parameters

None

Returns

This action returns a boolean, which is true if there are no current entities.

Example

Code

pw::Application isEmpty

Output

0

begin

pw::Application begin ?-mode_specific_flags? mode ?entities?

This action begins a mode in the application.

Parameters

-mode_specific_flagsSome modes support modifier flags.  See the usage page for each mode to see the available flags.
modeThis parameter is the mode keyword; < Create | Modify | Copy | Paste | Merge | Dimension | EllipticSolver | UnstructuredSolver | ExtrusionSolver | ReExtrusionSolver | DatabaseImport | DatabaseExport | GridImport | GridExport | CaeExport >.
entitiesThis parameter is a list of entities relevant to the mode; default is an empty list.

Returns

This action returns a new pw::Mode object.

Information

This command supports progress updates when mode is Paste.

Example

Code

set mode [pw::Application begin Create]
puts [$mode getType]

Output

pw::Creator

setClipboard

pw::Application setClipboard entity_list

This action sets the given list of entities to be the contents of the application clipboard.  The entities are copied in their current state and are not available for usage until pasted using the pw::Application begin Paste command.  Note that when writing a script that uses copying, if the copied data is not meant to be left on the clipboard for use outside of the script, one should use the pw::Copier mode instead of setClipboard.

Parameters

entity_listThis parameter is a list of pw::Entity or pw::Spacing objects, or a single pw::Entity or pw::Spacing object.

Returns

This action returns nothing.

Information

This command supports progress updates.

When pw::Spacing objects are copied to the clipboard, all spacing objects with non-zero values are retained.

For objects that have a zero value, they may be modified or ignored as follows.  If the spacing object is associated with a dimensioned connector, the actual grid spacing value will be used as the spacing value.  If the spacing object is not associated with a dimensioned connector and other spacing objects that do have either an explicit or implicit non-zero value are included in the copy operation, then the zero value spacing objects will be ignored.  Finally, if only zero value spacing objects are specified, they will be copied as is.  Note that pasting the zero spacing object will effective erase any specified spacing values on the selected targets of the paste operation.

Example

Code

# Copy 2 connectors to the clipboard
pw::Application setClipboard [list $con $con2]
puts "Clipboard size (a): [$pw::Application getClipboardCount]"
# Copy a the beginning spacing of a connector's second
# subconnector to the clipboard
set spacing1 [[$con getDistribution 1] getBeginSpacing]
pw::Application setClipboard $spacing1
puts "Clipboard size (b): [$pw::Application getClipboardCount]"
# Copy 2 non-zero spacings and 1 zero spacing to the clipboard
set spacing2 [[$con getDistribution 1] getEndSpacing]
set zeroSpace [pw::SpacingExplicit create]
pw::Application setClipboard [list $spacing1 $spacing2 $zeroSpace]
puts "Clipboard size (c): [$pw::Application getClipboardCount]"
# Copy a single zero-value spacing to the clipboard
pw::Application setClipboard [list $zeroSpace]
puts "Clipboard size (d): [$pw::Application getClipboardCount]"

Output

Clipboard size (a): 2
Clipboard size (b): 1
Clipboard size (c): 2
Clipboard size (d): 1

clearClipboard

pw::Application clearClipboard

Clear the contents of the application clipboard.

Parameters

none

Returns

nothing

isClipboardEmpty

pw::Application isClipboardEmpty

This action checks if the application clipboard contains any entities.

Parameters

There are no parameters.

Returns

This action returns a boolean, true if the clipboard does not contain any entities.

Example

Code

pw::Application isClipboardEmpty

Output

1

getClipboardCount

pw::Application getClipboardCount ?-type type_string?

This action returns the number of items explicitly copied to the clipboard.

Parameters

-type type_stringIf specified, this option filters the result to count only the entities of the specified type.  If no type is specified, then the total count is returned.  Note that the total is the count of entities that were explicitly added to the clipboard (e.g., if a single domain is pasted, the count will return 1 for just the domain -- the domain’s connectors will not be counted).

Returns

This action returns an integer value representing the number of entities copied to the clipboard.

Example

Code

pw::Application setClipboard $domain
set nc [pw::Application getClipboardCount -type pw::Connector]
set nd [pw::Application getClipboardCount -type pw::Domain]
set total [pw::Application getClipboardCount]
puts "Total clipboard items: $total"
puts "Clipboard connectors : $nc"
puts "Clipboard domains : $nd"

Output

Total clipboard items: 1
Clipboard connectors : 0
Clipboard domains : 1

reset

pw::Application reset ?-keep keep_list? ?reset_list?

Reset the settings of the application

Parameters

-keep keep_listThis optional parameter is a list of keywords that represent the settings that should be kept and not reset.  Valid keywords are < Attributes | CAE | Overset | Clipboard | Database | Defaults | Display | Grid | Layers | Rules | Sources | Tolerances >.  If a setting is listed here, it will override it being listed in the reset list.
reset_listThis optional parameter is a list of keywords that represent the settings that should be reset.  Valid keywords are < Attributes | CAE | Clipboard | Database | Defaults | Display | Grid | Layers | Rules | Sources | Tolerances >.  The default value for this parameter is a list including all keywords.

Returns

This action returns nothing.

Information

This command supports progress updates.

Example

Code

pw::Application reset -keep [list Clipboard Defaults]

getCAESolverNames

pw::Application getCAESolverNames

This action gets the names of the available CAE solvers.

Parameters

There are no parameters.

Returns

This action returns a string list of CAE solver names.

Example

Code

set solverNames [pw::Application getCAESolverNames]
foreach solverName $solverNames {
puts "> Solver: '$solverName'"
}

Output

Solver: 'ACUSIM/AcuSolve'
Solver: 'ADPAC'
Solver: 'ANSYS CFX'
Solver: 'ANSYS FLUENT'
Solver: 'CFD++'
Solver: 'CFDSHIP-IOWA'
Solver: 'CFL3D'
Solver: 'CGNS'
...snip...
Solver: 'UGRID'
Solver: 'USM3D'
Solver: 'VSAERO'
Solver: 'VSAEROhybrid'
Solver: 'WIND (structured)'
Solver: 'WIND (unstructured)'

getCAEUnsupportedEntities

pw::Application getCAEUnsupportedEntities name dimension

This action gets the existing entities unsupported by a CAE solver and dimension.

Parameters

nameThis parameter is a CAE solver name string and must be a name returned by getCAESolverNames.
dimensionThis parameter is the dimension an integer; [2, 3].

Returns

This action returns a list of pw::GridEntity objects.

Example

Code

set unsupEnt [pw::Application getCAEUnsupportedEntities VSAERO 2]
set unsupEntNames {}
foreach ent $unsupEnt {
lappend unsupEntNames [$ent getName]
}
puts $unsupEntNames

Output

dom-1 dom-2 dom-3 dom-4 dom-5 dom-6 dom-7 dom-8 blk-1

isValidDimension

pw::Application isValidDimension name dim

This action determines if the given dimension is supported by a CAE solver.

Parameters

nameThis parameter is a CAE solver name string and must be a name returned by getCAESolverNames.
dimThis parameter is the integer dimension; [2,3].

Returns

This action returns a boolean, true if dimension is valid.

Example

Code

pw::Application isValidDimension VSAERO 3

Output

0

isValidElement

pw::Application isValidElement name type

This action determines if the given element type is supported by a CAE solver.

Parameters

nameThis parameter is a CAE solver name string and must be a name returned by getCAESolverNames.
typeThis parameter is an element type string; < Line | Triangle | Quadrilateral | Tetrahedral | Hexahedral | Pyramid | Wedge >.

Returns

This action returns a boolean, true if the element type is valid.

Example

Code

pw::Application isValidElement VSAERO Pyramid

Output

0

isValidElementTopology

pw::Application isValidElementTopology name type

This action determines if the given element topology type is supported by a CAE solver.

Parameters

nameThis parameter is a CAE solver name string and must be a name returned by getCAESolverNames.
typeThis parameter is an element topology type string; < Structured | Unstructured | Prismatic >.

Returns

This action returns a boolean, true if the element topology type is valid.

Example

Code

pw::Application isValidElementTopology VSAERO Unstructured

Output

0

setCAESolver

pw::Application setCAESolver name ?dimension?

This action sets the current CAE solver.

Parameters

nameThis parameter is a CAE solver name string and must be a name returned by getCAESolverNames.
dimensionThis parameter is the integer dimension of the solver.  The default is 3.

Returns

This action returns nothing.

Information

The list of valid CAE solver names will change as new solvers are added and custom CAE plugins are loaded.  getCAESolverNames will return a string list of available CAE solver names.

Example

Code

pw::Application setCAESolver NSAERO

getCAESolver

pw::Application getCAESolver

This action gets the name of the current CAE solver.

Parameters

There are no parameters.

Returns

This action returns a string, the current CAE solver name.

Example

Code

pw::Application getCAESolver

Output

NSAERO

setCAESolverDimension

pw::Application setCAESolverDimension dimension

This action sets the current CAE solver dimension.

Parameters

dimensionThis parameter is the integer dimension of the solver.  The default is 3.

Returns

This action returns nothing.

Information

Example

Code

pw::Application setCAESolverDimension 3

getCAESolverDimension

pw::Application getCAESolverDimension

This action gets the dimension of the current CAE solver.

Parameters

There are no parameters.

Returns

This action returns an integer, the current CAE solver dimension (2 or 3).

Example

Code

pw::Application getCAESolverDimension

Output

3

areCAESolverVariablesSupported

pw::Application areCAESolverVariablesSupported

This action returns whether settable variables are supported by the current CAE solver.

Parameters

There are no parameters.

Returns

This action returns true if the solver has variables that can be set, or false if not.

Example

Code

pw::Application areCAESolverVariablesSupported

Output

true

getCAESolverAttributeNames

pw::Application getCAESolverAttributeNames ?-group < All | IO | *CAE* >? ?-fullname? ?-regex? ?pattern?

This action gets the available CAE solver attribute names.

Parameters

-group nameThis optional string flag signifies that only attributes in the named group should be returned.  If All, attribute names from all groups are returned.
-fullnameThis optional flag forces all returned attribute names to be in their full Group.Name format.  By default, only each attribute’s Name is returned without the Group. prefix.
-regexThis optional flag signifies that the given pattern should be considered a regular expression pattern rather than a glob pattern.
patternThis optional parameter is the string pattern used to filter the returned attribute names.  If a pattern is not given, all group appropriate attribute names are returned.

Returns

A string list of the matching CAE solver attribute names.

See Also

CAE Solver Attributes

Example

Code

puts [pw::Application getCAESolverAttributeNames]
puts ""
puts [pw::Application getCAESolverAttributeNames "Allowed*Conditions"]
puts ""
puts [pw::Application getCAESolverAttributeNames -fullname "Allowed*Conditions"]
puts ""
puts [pw::Application getCAESolverAttributeNames -group CAE]
puts ""
puts [pw::Application getCAESolverAttributeNames -fullname -regex "(c|a)t"]

Output

AllowedFileFormats AllowedDataPrecision AllowedExportConditionsOnly
AllowedBoundaryConditions AllowedVolumeConditions FileExtensions
FileDestination {Combine Anisotropic Cells} Structured

AllowedBoundaryConditions AllowedVolumeConditions

IO.AllowedBoundaryConditions IO.AllowedVolumeConditions

{Combine Anisotropic Cells} Structured

IO.AllowedFileFormats IO.AllowedDataPrecision IO.FileDestination CAE.Structured

getCAESolverAttribute

pw::Application getCAESolverAttribute attribute_name

This action gets the named CAE solver attribute.

Parameters

attribute_nameThis parameter is the attribute name string.

Returns

This action returns the attribute value.

Information

The return value data-type depends on the attribute being retrieved.

See Also

CAE Solver Attributes

setCAESolverAttribute

pw::Application setCAESolverAttribute ?-create? attribute_name value

This action sets the named CAE solver attribute.

Parameters

-createThis optional flag forces an attribute to be created if it does not already exist.
attribute_nameThis parameter is the attribute name string.  The attribute must exist unless -create is specified.
valueThis parameter is the new attribute value.

Returns

This action returns nothing.

Information

If attribute_name does not exist an error will be triggered unless -create is specified.

If attribute_name already exists -create is silently ignored and the value will be assigned.

Attributes created this way will be “auto typed”.  That is, the type is inferred from the value provided.  For example, “4.5” will be Real, “7” will be UInt, “-7” will be Int, etc.

addCAESolverAttribute

pw::Application addCAESolverAttribute group name type access desc val range

This action adds the named attribute to the current CAE solver.

Parameters

All parameters must be present and in the order specified.

groupThe attribute group name.  Must be CAE or an empty string.
nameThe attribute’s name string.
typeThe attribute’s data type string.  One of Bool, Int, UInt, String, Real, Enum, StringList, EnumList.
accessThe attribute’s access specification string.  Combination of: R, W (R=read, W=write).
descThe attribute’s description string.
valThe attribute’s default/initial value.  Value must be consistent with the attribute type.
rangeA string representing the attribute’s valid range specification.  Range specifications are type-specific (see below).  If no range is given, the attribute can assume any machine valid value.

Returns

This action returns nothing.

Attribute Types

BoolLogical true/false value
IntSigned integer value
UintUnsigned integer value
RealFloating point value
StringA text string value
StringListA collection of String values
EnumA string value with an associated integer value.  The string must be one of a predefined set of valid string values.
EnumListA collection of Enum values

Attribute Access

RAttribute value is readable
WAttribute value is writable

String Range Format

pattern[ minLen maxLen]

where,

patternA regular expression (regex) or a glob expression pattern.  This pattern is used to validate string values.  A regex pattern is delimited with slash characters (/regexPattern/).  A glob pattern is delimited with colon characters (:globPattern:).
minLenThe smallest valid string length (>= 0).
maxLenThe largest valid string length (>= minLen).  Use +Inf for an unlimited string length.

example,

The regex pattern “/^hello.*!$/” and the glob pattern “:hello*!:” will allow strings starting with “hello”, followed by zero or more characters, and ending with “!”.  Some valid strings include “hello world!”, “hello!”, and “hello!!!”.

Enum Range Format

[@<sepChar>]name[=int][<sepChar>name[=int]...]

where,

@<sepChar>The optional separator-char declaration.  The character following the ‘@’ is the separator.  If not present, the separator defaults to the ‘|’ character.
name[=val]The enumerator item name and the optional integer value that corresponds to this name.  If val is not specified for an name, it assumes the value of the previous name plus 1.  If there is no previous name, it is assigned to 0 by default.  Each name MUST be unique within an enum definition.  However, val values may be repeated.

enum example 1,

The follwing 2 Enums are equivalent.  The first enum uses the default ‘|’ (vbar) separator character.  The second uses a custom ‘,’ (comma) separator character.

up|down=6|left|right=10|upLeft|upRight|downLeft=6|downRight @,up,down=6,left,right=10,upLeft,upRight,downLeft=6,downRight

Resulting in the following enum item associations

up=0, down=6, left=7, right=10, upLeft=11, upRight=12, downLeft=6, downRight=7

enum example 2,

The follwing 2 Enums are NOT equivalent.

A,B|C,D|E,F produces “A,B”=0, “C,D”=1, “E,F”=2 @,A,B|C,D|E,F produces “A”=0, “B|C”=1 “D|E”=2 “F”=3

Bool Range Format

The Bool range format is the same as the Enum range format.  However, for Bool, each item’s value is interpreted as a logical true or false.  The names defined in the range are added to the standard “string to boolean” name mappings.

The standard “string to boolean” mappings are;

  • ”true” and “yes” map to logical true
  • ”false” and “no” map to logical false

All integer values are mapped as expected.  That is, 0 is mapped to false and all other non-zero integer values are mapped to true.

example,

This range will cast the strings “true,yes,accept,bad” to true and “false,no,reject,bad” to false.

”accept=1|reject=0|good=1|bad=0”

Int, UInt and Real Range Format

minVal maxVal[ typicalMinVal typicalMaxVal]

where,

minValThe smallest valid value or -Inf to allow any machine valid value less than maxVal.
maxValThe largest valid value or +Inf to allow any machine valid value greater than minVal.
typicalMinValThe smallest value that is typically used for this attribute where “minVal <= typicalMinVal < typicalMaxVal”.
typicalMaxValThe largest value that is typically used for this attribute where “typicalMinVal < typicalMaxVal <= maxVal”.

StringList Range Format

pattern[ minLen maxLen[ minCount maxCount]]

where,

pattern minLen maxLen - See the String Range Format for details.

minCountThe smallest number of string items required (>= 0).
maxCountThe largest number of string items allowed (>= minLen).  Use +Inf for an unlimited number of items.

EnumList Range Format

{EnumRange}[ minCount maxCount]

where,

EnumRangeSee the Enum Range Format for details.
minCountThe smallest number of enum items required (>= 0).
maxCountThe largest number of enum items allowed (>= minLen).  Use +Inf for an unlimited number of items.

Examples

Code

proc addAttr { name type val {range {}} {access RW} } {
set desc "$type attribute $name"
pw::Application addCAESolverAttribute CAE $name $type $access $desc $val $range
}

pw::Application reset

addAttr iAttr Int -5 {-10 10}
addAttr uAttr UInt 5
addAttr rAttr Real 1.1 {0.0 +Inf 1.0 3.0}
addAttr sAttr1 String "str3" {/str[0-9]/ 4 4}
addAttr sAttr2 String "val!" {:v*: 0 +Inf}
addAttr eAttr1 Enum "e00" {e00|e01|e02|e03}
addAttr eAttr2 Enum "e03" {@,e00,e01,e02,e03}
addAttr slAtt1 StringList "str3|str7|str9" {/str[0-9]/ 4 4 1 5}
addAttr slAtt2 StringList "victor|vicky|vlad" {:v*: 0 +Inf 1 5}
addAttr elAttr EnumList "e00|e03|e01" {{e00|e01|e02|e03} 1 5}

set fmt "| %-7.7s | %-10.10s | %-17.17s | %-22.22s | %-2.2s | %-28.28s |"
set hr [string repeat "-" 50]
puts [format $fmt "name" "type" "default" "range" "rw" "description"]
puts [format $fmt $hr $hr $hr $hr $hr $hr]
set names [pw::Application getCAESolverAttributeNames]
foreach name $names {
set defn [pw::Application getCAESolverAttributeDefinition $name]
lassign $defn group name type access desc default range
puts [format $fmt $name $type $default $range $access $desc]
}

Output

| name    | type       | default           | range                  | rw | description                  |
| ------- | ---------- | ----------------- | ---------------------- | -- | ---------------------------- |
| iAttr | Int | -5 | -10 10 | RW | Int attribute iAttr |
| uAttr | UInt | 5 | | RW | UInt attribute uAttr |
| rAttr | Real | 1.1 | 0.0 +Inf 1.0 3.0 | RW | Real attribute rAttr |
| sAttr1 | String | str3 | /str[0-9]/ 4 4 | RW | String attribute sAttr1 |
| sAttr2 | String | val! | :v*: 0 +Inf | RW | String attribute sAttr2 |
| eAttr1 | Enum | e00 | e00|e01|e02|e03 | RW | Enum attribute eAttr1 |
| eAttr2 | Enum | e03 | @,e00,e01,e02,e03 | RW | Enum attribute eAttr2 |
| slAtt1 | StringList | str3|str7|str9 | /str[0-9]/ 4 4 1 5 | RW | StringList attribute slAtt1 |
| slAtt2 | StringList | victor|vicky|vlad | :v*: 0 +Inf 1 5 | RW | StringList attribute slAtt2 |
| elAttr | EnumList | e00|e03|e01 | {e00|e01|e02|e03} 1 5 | RW | EnumList attribute elAttr |

getCAESolverAttributeDefinition

pw::Application getCAESolverAttributeDefinition ?-rangeNamesOnly? attribute_name

This action gets the definition of a CAE solver attribute.

Parameters

-rangeNamesOnlyThis optional flag strips ordinal values from the returned Enum, EnumList and Bool range definitions.  This option is silently ignored for all other attribute types.
attribute_nameThe string attribute name.

Returns

This action returns the attribute definition which will be a list containing 7 items: “group name type access desc default range”.

See Also

<pw::Application addCAESolverAttribute> for details.

Example

Code

pw::Application reset

proc addCaeAttribute { name type val range } {
set desc "Testing '$type' attribute"
pw::Application addCAESolverAttribute CAE $name $type RW $desc $val $range
}

proc putDefn { attrDef } {
lassign $attrDef group name type access desc value range
puts " group = '$group'"
puts " name = '$name'"
puts " type = '$type'"
puts " access = '$access'"
puts " desc = '$desc'"
puts " value = '$value'"
puts " range = '$range'"
puts ""
}

addCaeAttribute test Enum {Element Side} {Element Side=22|Node=33}
puts "RANGE WITH ORDINALS"
putDefn [pw::Application getCAESolverAttributeDefinition test]

puts "RANGE WITH NAMES ONLY"
putDefn [pw::Application getCAESolverAttributeDefinition test -rangeNamesOnly]

Output

RANGE WITH ORDINALS
group = 'CAE'
name = 'test'
type = 'Enum'
access = 'RW'
desc = 'Testing 'Enum' attribute'
value = 'Element Side'
range = 'Element Side=22|Node=33'

RANGE WITH NAMES ONLY
group = 'CAE'
name = 'test'
type = 'Enum'
access = 'RW'
desc = 'Testing 'Enum' attribute'
value = 'Element Side'
range = 'Element Side|Node'

setOversetAssembler

pw::Application setOversetAssembler name

This action sets the current overset assembler.

Parameters

nameThis parameter is a overset assembler name string and must be a name returned by getOversetAssemblerNames and must be valid for the current CAE dimension.

Returns

This action returns nothing.

Information

The list of valid overset assembler names will change as new assemblers are added and custom overset assemblers are loaded.  Use getOversetAssemblerNames to determine available assembler names.

getOversetAssembler

pw::Application getOversetAssembler

This action gets the name of the current overset assembler.

Parameters

There are no parameters.

Returns

This action returns a string, the current overset assembler name.

getOversetAssemblerNames

pw::Application getOversetAssemblerNames ?dimension?

This action gets the names of the available overset assemblers.

Parameters

dimensionthis optional parameter is an integer representing the CAE dimension for which valid overset assembler names will be returned; [2,3].  If not specified, the current CAE dimension will be used.

Returns

This action returns a string list of overset assembler names for the given dimension.

isValidOversetDimension

pw::Application isValidOversetDimension name dim

This action determines if the given dimension is supported by an overset assembler.

Parameters

nameThis parameter is a string specifying an overset assembler name.  It must be a name returned by getOversetAssemblerNames.
dimThis parameter is the integer dimension; [2,3].

Returns

This action returns a boolean, true if dimension is valid.

getOversetAssemblerAttribute

pw::Application getOversetAssemblerAttribute attribute_name

This action gets the named overset assembler attribute.

Parameters

attribute_nameThis parameter is the attribute name string.

Returns

This action returns the attribute value.

Information

The return value data-type depends on the attribute being retrieved.

See Also

Overset Assembler Attributes

export

pw::Application export ?-format file_format? ?-precision fp_precision? ?-noOverwrite? ?-output data_type? ents filename

This action exports CAE data in a format specific to the currently selected analysis software.  For analysis software that allows export of boundary condition data only, set the output_data to Conditions.

Parameters

-format file_formatThis optional parameter is the file format string of the exported file; < ASCII | Binary | Unformatted >.
-precision fp_precisionThis optional parameter is the floating point precision string of the exported file; < Single | Double >.
-noOverwriteThis optional flag is a notification to not export if filename already exists.
-output data_typeThis optional parameter is the data to export string; < All | Conditions >.
entsThis parameter is a list of pw::Domain objects to export in 2D mode or a list of pw::Block objects to export in 3D mode.
filenameThis parameter is a string that is the path, path and basename, or path and filename for the export of CAE data.

Information

This command supports progress updates.

This action is “all or nothing.”  It does not allow you to handle error recovery.  If you need more fine-grained control over the export process, use a pw::CaeExporter I/O mode.

Returns

This action returns nothing.

See Also

begin, pw::IOMode, pw::CaeExporter

Example

Code

set block [pw::Grid getByName "blk-1"]
pw::Application export -noOverwrite $block "C:\test.cgns"

getXYZ

pw::Application getXYZ < point | coord >

This action gets the 3D position of the given point or grid coordinate.

Parameters

pointThis parameter is a point.
coordThis parameter is a grid coord.

Returns

This action returns an xyz vector.

Example

Code

pw::Application getXYZ [list 2 5 $dom]

Output

0.833333333333333 3.3333333333333326 0.0

combine

pw::Application combine < -X | -Y | -Z | -U | -V > < point1 | coord1 > < point2 | coord2 >

This action combines two points or grid coordinates in different ways.

Parameters

-XThis optional flag is a notification to combine the X value from the first point/coordinate with the Y and Z values from the second point/coordinate.
-YThis optional flag is a notification to combine the Y value from the first point/coordinate with the X and Z values from the second point/coordinate.
-ZThis optional flag is a notification to combine the Z value from the first point/coordinate with the X and Y values from the second point/coordinate.
-UThis optional flag is a notification to combine the U value from the first point/coordinate with the V value from the second point/coordinate, if the input is not db constrained an error occurs.
-VThis optional flag is a notification to combine the V value from the first point/coordinate with the U value from the second point/coordinate, if the input is not db constrained an error occurs.
point1This parameter is a point.
coord1This parameter is a grid coord.
point2This parameter is another point.
point2This parameter is another grid coord.

Returns

This action returns a point.

Example

Code

pw::Application combine -Z [list 1 1 1] [list 2 2 2]

Output

2.0 2.0 1.0

getEntity

pw::Application getEntity < point | coord >

This action gets the entity of the given point or grid coordinate.

Parameters

pointThis parameter is a point.
coordThis parameter is a grid coord.

Returns

This action returns a pw::Entity object.

Information

If the given point is not database constrained or a valid grid coordinate, an error will occur.  The point cannot be in model space since an xyz vector is not connected to specific entities.

Example

Code

set ent [pw::Application getEntity [list 2 5 $dom]]
puts [$ent getName]

Output

dom-1

getDescription

pw::Application getDescription < point | coord >

This action gets the description of the given point or grid coordinate.

Parameters

pointThis parameter is a point.
coordThis parameter is a grid coord.

Returns

This action returns a string giving the entity name and coordinates.

Information

If a point in model space is used, the same xyz vector is returned since there is not a connection to an entity associated with it.

Example

Code

pw::Application getDescription [list 5 $con]

Output

con-1 5

getUndoList

pw::Application getUndoList

This action returns the list of undo levels available.

Parameters

There are no parameters.

Returns

This action returns a string list of undo checkpoint labels.

Information

The labels correspond to the names passed into markUndoLevel.  The number of labels indicates the number of undo steps available.  The first label is the first available undo operation.

Example

Code

pw::Application getUndoList

Output

getRedoList

pw::Application getRedoList

This action returns the list of redo levels available.

Parameters

There are no parameters.

Returns

This action returns a string list of undo checkpoint labels.

Information

The labels correspond to the names passed into markUndoLevel.  The number of labels indicates the number of redo steps available.  The first label is the first available redo operation.

Example

Code

pw::Application getRedoList

Output

undo

pw::Application undo

This action undoes one step.

Parameters

There are no parameters.

Returns

This action returns a boolean, true if successful.

Example

Code

pw::Application undo

Output

1

resetUndoLevels

pw::Application resetUndoLevels

This action resets the undo levels.

Parameters

There are no parameters for this action.

Returns

This action returns nothing.

redo

pw::Application redo

This action redoes one step.

Parameters

There are no parameters.

Returns

This action returns a boolean, true if successful.

Example

Code

pw::Application redo

Output

1

markUndoLevel

pw::Application markUndoLevel name

This action saves an undo checkpoint.

Parameters

nameThis parameter is the description string for the undo level.

Returns

This action returns nothing.

Example

Code

pw::Application markUndoLevel CreateDomain

exit

pw::Application exit ?code?

This action shuts down the full application immediately, with out any prompts to the user to warn about unsaved data.

Parameters

codeThis optional parameter is an integer exit code, which will be returned by the application as it exits.  The default is 0.

Returns

This action returns nothing.

isInteractive

pw::Application isInteractive

Check to see if the script is being run from within the Pointwise application as opposed to being run in a Tcl batch interpreter.

Parameters

There are no parameters.

Returns

This function returns true if the script is being run from within the Pointwise application.

Example

Code

pw::Application isInteractive

Output

1

Static Attributes

UndoMaximumLevels

pw::Application get/setUndoMaximumLevels levels

This sets/gets the maximum number of undo levels maintained.

Type

This attribute is of type integer with the range [0, infinity); 0 disabling undo.

Default

The default for this attribute is 0 when run in batch mode.  When run interactively, the default value is specified by the user preferences.

Example

Code

pw::Application setUndoMaximumLevels 15

GridPreference

pw::Application get/setGridPreference < Structured | Unstructured >

This attribute is the grid preference of the application.

Type

This attribute is of type string with values < Structured | Unstructured >.

Default

The default for this attribute is Structured.

Example

Code

pw::Application setGridPreference Unstructured

CAE Solver Attributes

FileExtensions

pw::Application getCAESolverAttribute FileExtensions

This gets the extensions of files exported for the CAE solver.

Type

This attribute is a list of strings.

Information

This attribute is read only.

FileDestination

pw::Application getCAESolverAttribute FileDestination

This gets the type of file destination that is expected by the current CAE when calling the <pw::Application export> command.

Type

This attribute is of type string; < Filename | Basename | Folder >.

Information

This attribute is read only.

AllowedFileFormats

pw::Application getCAESolverAttribute AllowedFileFormats

This gets the allowed file formats when exporting for the CAE solver.

Type

This attribute is a string list containing one or more of < ASCII | Binary | Unformatted >.

Information

This attribute is read only.

AllowedDataPrecision

pw::Application getCAESolverAttribute AllowedDataPrecision

This gets the allowed data precision when exporting for the CAE solver.

Type

This attribute is a string list containing one or more of < Single | Double >.

Information

This attribute is read only.

AllowedFileByteOrder

pw::Application getCAESolverAttribute AllowedFileByteOrder

This gets the allowed file byte order when exporting for the CAE solver.

Type

This attribute is a string list containing one or more of < BigEndian | LittleEndian >.

Information

This attribute is read only.

AllowedExportConditionsOnly

pw::Application getCAESolverAttribute AllowedExportConditionsOnly

This gets a boolean flag that indicates whether the CAE solver allows export of the conditions data without having to export the grid data.  This can be accomplished by using the -output Conditions parameter for the <pw::Application export> command.

Type

This attribute is of type boolean.

Information

This attribute is read only.

AllowedVolumeConditions

pw::Application getCAESolverAttribute AllowedVolumeConditions

This returns a boolean flag that indicates whether the CAE solver supports the volume conditions.  If it does not, volume conditions cannot be created.

Type

This attribute is of type boolean.

Information

This attribute is read only.

ImplementationMethod

pw::Application getCAESolverAttribute ImplementationMethod

This gets the method used for the implementation of the exporter.

Type

This attribute is of type string; < Plugin | Builtin | Legacy >.

Information

This attribute is read only.

AllowedExportMirroring

pw::Application getCAESolverAttribute AllowedExportMirroring

This returns a boolean flag that indicates whether the CAE solver supports setting an export mirror plane.  If it does not, a mirror plane cannot be defined.

Type

This attribute is of type boolean.

Information

This attribute is read only.

AllowedElements

pw::Application getCAESolverAttribute AllowedElements

This gets a list of the element types supported by the CAE solver.

Type

This attribute is a string list containing one or more of < Line | Triangle | Quadrilateral | Tetrahedral | Hexahedral | Pyramid | Wedge >.

Information

This attribute is read only.

Example

Code

set solvers {USM3D TACOMA OpenFOAM SCRYU}
foreach solver $solvers {
pw::Application setCAESolver $solver
puts "$solver: [pw::Application getCAESolverAttribute AllowedElements]"
}

Output

USM3D: Line Triangle Tetrahedral
TACOMA: Line Quadrilateral Hexahedral
OpenFOAM: Line Triangle Quadrilateral Tetrahedral Hexahedral Pyramid Wedge
SCRYU: Line Triangle Quadrilateral Hexahedral Wedge

AllowedElementTopologies

pw::Application getCAESolverAttribute AllowedElementTopologies

This gets a list of the element topologies supported by the CAE solver.

Type

This attribute is a string list containing one or more of < Structured | Unstructured | Prismatic >.

Information

This attribute is read only.

Example

Code

set solvers {USM3D TACOMA OpenFOAM SCRYU}
foreach solver $solvers {
pw::Application setCAESolver $solver
puts "$solver: [pw::Application getCAESolverAttribute AllowedElementTopologies]"
}

Output

USM3D: Unstructured
TACOMA: Structured
OpenFOAM: Structured Unstructured Prismatic
SCRYU: Structured Prismatic

Overset Assembler Attributes

AssemblyAllowed

pw::Application getOversetAssemblerAttribute AssemblyAllowed

This gets the flag that indicates whether the current overset assembler allows overset grid assembly.

Type

This attribute is of type boolean.

Information

This attribute is read only.

AllowedBoundaryConditions

pw::Application getOversetAssemblerAttribute AllowedBoundaryConditions

This gets the flag that indicates whether the current overset assembler allows boundary conditions.

Type

This attribute is of type boolean.

Information

This attribute is read only.

AllowedVolumeConditions

pw::Application getOversetAssemblerAttribute AllowedVolumeConditions

This gets the flag that indicates whether the current overset assembler allows volume conditions.

Type

This attribute is of type boolean.

Information

This attribute is read only.

AllowedCollarBoundaryConditions

pw::Application getOversetAssemblerAttribute AllowedCollarBoundaryConditions

This gets the flag that indicates whether the current overset assembler allows collar boundary conditions.

Type

This attribute is of type boolean.

Information

This attribute is read only.

pw::Application getVersion
This action gets the program and version of the application.
pw::Application checkForDuplicates ?-rules ruleVar? filename
This action checks if loading the given file would result in duplicate named entities.
pw::Application checkForMissingReferences ?-local? filename
This action checks if loading the given file would result in missing references.
pw::Application checkCAEUnsupportedEntities ?-ignoreCAESolver? fileName
This action checks for the number of unsupported entities that will be ignored or deleted if the file is loaded.
pw::Application load ?-ignoreCAESolver? ?-environment? ?-rules < KeepOld | KeepNew | KeepBoth >? filename
This action loads the entities and settings from the native file.
pw::Application save ?-compress level? ?-noOverwrite? ?< -entities ents | -environment >? filename
This action saves the current entities and settings to the native file format.
pw::Application isModified
This action checks if the entities or settings have been modified since the last save.
pw::Application clearModified
This action resets the flags that track whether or not modifications have occurred.
pw::Application isEmpty
This action checks if there are no entities.
pw::Application begin ?-mode_specific_flags? mode ?entities?
This action begins a mode in the application.
pw::Application setClipboard entity_list
This action sets the given list of entities to be the contents of the application clipboard.
pw::Application clearClipboard
Clear the contents of the application clipboard.
pw::Application isClipboardEmpty
This action checks if the application clipboard contains any entities.
pw::Application getClipboardCount ?-type type_string?
This action returns the number of items explicitly copied to the clipboard.
pw::Application reset ?-keep keep_list? ?reset_list?
Reset the settings of the application
pw::Application getCAESolverNames
This action gets the names of the available CAE solvers.
pw::Application getCAEUnsupportedEntities name dimension
This action gets the existing entities unsupported by a CAE solver and dimension.
pw::Application isValidDimension name dim
This action determines if the given dimension is supported by a CAE solver.
pw::Application isValidElement name type
This action determines if the given element type is supported by a CAE solver.
pw::Application isValidElementTopology name type
This action determines if the given element topology type is supported by a CAE solver.
pw::Application setCAESolver name ?dimension?
This action sets the current CAE solver.
pw::Application getCAESolver
This action gets the name of the current CAE solver.
pw::Application setCAESolverDimension dimension
This action sets the current CAE solver dimension.
pw::Application getCAESolverDimension
This action gets the dimension of the current CAE solver.
pw::Application areCAESolverVariablesSupported
This action returns whether settable variables are supported by the current CAE solver.
pw::Application getCAESolverAttributeNames ?-group < All | IO | *CAE* >? ?-fullname? ?-regex? ?pattern?
This action gets the available CAE solver attribute names.
pw::Application getCAESolverAttribute attribute_name
This action gets the named CAE solver attribute.
pw::Application setCAESolverAttribute ?-create? attribute_name value
This action sets the named CAE solver attribute.
pw::Application addCAESolverAttribute group name type access desc val range
This action adds the named attribute to the current CAE solver.
pw::Application getCAESolverAttributeDefinition ?-rangeNamesOnly? attribute_name
This action gets the definition of a CAE solver attribute.
pw::Application setOversetAssembler name
This action sets the current overset assembler.
pw::Application getOversetAssembler
This action gets the name of the current overset assembler.
pw::Application getOversetAssemblerNames ?dimension?
This action gets the names of the available overset assemblers.
pw::Application isValidOversetDimension name dim
This action determines if the given dimension is supported by an overset assembler.
pw::Application getOversetAssemblerAttribute attribute_name
This action gets the named overset assembler attribute.
pw::Application export ?-format file_format? ?-precision fp_precision? ?-noOverwrite? ?-output data_type? ents filename
This action exports CAE data in a format specific to the currently selected analysis software.
pw::Application getXYZ < point | coord >
This action gets the 3D position of the given point or grid coordinate.
pw::Application combine < -X | -Y | -Z | -U | -V > < point1 | coord1 > < point2 | coord2 >
This action combines two points or grid coordinates in different ways.
pw::Application getEntity < point | coord >
This action gets the entity of the given point or grid coordinate.
pw::Application getDescription < point | coord >
This action gets the description of the given point or grid coordinate.
pw::Application getUndoList
This action returns the list of undo levels available.
pw::Application getRedoList
This action returns the list of redo levels available.
pw::Application undo
This action undoes one step.
pw::Application resetUndoLevels
This action resets the undo levels.
pw::Application redo
This action redoes one step.
pw::Application markUndoLevel name
This action saves an undo checkpoint.
pw::Application exit ?code?
This action shuts down the full application immediately, with out any prompts to the user to warn about unsaved data.
pw::Application isInteractive
Check to see if the script is being run from within the Pointwise application as opposed to being run in a Tcl batch interpreter.
pw::Application get/setUndoMaximumLevels levels
This sets/gets the maximum number of undo levels maintained.
pw::Application get/setGridPreference < Structured | Unstructured >
This attribute is the grid preference of the application.
pw::Application getCAESolverAttribute FileExtensions
This gets the extensions of files exported for the CAE solver.
pw::Application getCAESolverAttribute FileDestination
This gets the type of file destination that is expected by the current CAE when calling the pw::Application export command.
pw::Application getCAESolverAttribute AllowedFileFormats
This gets the allowed file formats when exporting for the CAE solver.
pw::Application getCAESolverAttribute AllowedDataPrecision
This gets the allowed data precision when exporting for the CAE solver.
pw::Application getCAESolverAttribute AllowedFileByteOrder
This gets the allowed file byte order when exporting for the CAE solver.
pw::Application getCAESolverAttribute AllowedExportConditionsOnly
This gets a boolean flag that indicates whether the CAE solver allows export of the conditions data without having to export the grid data.
pw::Application getCAESolverAttribute AllowedVolumeConditions
This returns a boolean flag that indicates whether the CAE solver supports the volume conditions.
pw::Application getCAESolverAttribute ImplementationMethod
This gets the method used for the implementation of the exporter.
pw::Application getCAESolverAttribute AllowedExportMirroring
This returns a boolean flag that indicates whether the CAE solver supports setting an export mirror plane.
pw::Application getCAESolverAttribute AllowedElements
This gets a list of the element types supported by the CAE solver.
pw::Application getCAESolverAttribute AllowedElementTopologies
This gets a list of the element topologies supported by the CAE solver.
pw::Application getOversetAssemblerAttribute AssemblyAllowed
This gets the flag that indicates whether the current overset assembler allows overset grid assembly.
pw::Application getOversetAssemblerAttribute AllowedBoundaryConditions
This gets the flag that indicates whether the current overset assembler allows boundary conditions.
pw::Application getOversetAssemblerAttribute AllowedCollarBoundaryConditions
This gets the flag that indicates whether the current overset assembler allows collar boundary conditions.
Base type for all glyph types
A string is an array of characters.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
An integer is a whole number.
The mode base type
Global actions of the application
The copy mode type
Entity type
Base class for spacing types
Domain type
Block type
The CaeExporter IO mode type.
The base IO mode type
A point is a position either in model space or database parameter space.
A coord is a position in grid space.
A vector is a list of float values.