Ask Expression Variable

Procedure Name

MOM_ask_ess_exp_value <variable_name>

Description

NX has as an Expression module. This allows users to define variables and expressions and then use those variables as parameters for entities such as Modeling features.

This MOM function provides access to the variables of the Expression module, i.e., it returns the value of the Expression variable.

Input

variable name

Example

MOM_ask_ess_exp_value diameter

Close Output File

Procedure Name

MOM_close_output_file <filename>

Description

This extension allows you to suspend writing output to a particular file until it is opened again.

Input

file name

Example

MOM_close_output_file $mom_output_doc_file2

DEBUG Mode

Procedure Name

MOM_set_debug_mode <ON | OFF>

Description

This will activate, deactivate, and resume the debugger. Like any TCL extension, this command may be called from any place in the TCL script.

If ON, the debugger will activate by initializing with data entered in the debugger dialog or stdout.

If OFF, the debugger will be deactivated.

Input

debug attribute

Example

MOM_set_debug_mode ON

MOM_set_debug_mode OFF

Do Template

Procedure Name

MOM_do_template <template_name> {BUFFER | CREATE}

Description

Generate output based upon the Block Template template_name.

BUFFER has the same meaning as before. BUFFER will generate the output value for Block Template template_name but does not add it to the output buffer, and hence, does not output it to the output file.

CREATE will generate the value for Block Template template_name but does not output to the output buffer.

This function returns the string created as the result of the template name.

Input

template name

Example

MOM_do_template Linear

Do Template File

Procedure Name

MOM_do_template_file <template_file>

Description

Reads and evaluates a template file.

If you use HDRF='filename', BDYF='filename', or FTRF='filename', MOM_do_template_file is invoked automatically with filename as its argument.

Input

template name

Example

MOM_do_template_file my_template.tpl

Force

Procedure Name

MOM_force <Always | Once | Off > < Address_1 ... Address_n>

Description

The next time that a block template that contains a reference to any of the input address names is evaluated, the word that contains that address will be output regardless of its modality attribute.

User

 

MOM Architecture

 

MOM_force

ONCE ---->

MOM_suppress
MOM_force

ONCE
ONCE

MOM_force

OFF ---->

MOM_force is set to

OFF

MOM_force

ALWAYS---->

MOM_suppress
MOM_force is set to

OFF
ALWAYS

Input

modality attribute, address names

Example

MOM_force_address Once X Y Z

Address output with MOM_suppress OFF programmed in tcl (default state)

 

Programmed in tcl

Definition file

MOM_force ONCE

MOM_suppress ONCE

 Neither

Force OFF(modal)

Yes

No

If different

Force ALWAYS(non-modal)

Yes

No

Yes

 

If both MOM_force ONCE and MOM_suppress once are programmed, the last one will take effect.

If MOM_suppress ALWAYS is programmed, the address will never be output. All MOM_force ONCE and MOM_suppress ONCE commands are ignored.

In the definition file, Force OFF or Force ALWAYS should define the modality of the address. Using MOM_force OFF or MOM_force ALWAYS to redefine the modality in the tcl is not recommended.

 

Force Block

Procedure Name

MOM_force_block <Always | Once | Off > <Block_1 ... Block_n>

Description

User

 

MOM Architecture

 

MOM_force

ONCE ---->

MOM_suppress
MOM_force

ONCE
ONCE

MOM_force

OFF ---->

MOM_force is set to

OFF

MOM_force

ALWAYS---->

MOM_suppress
MOM_force is set to

OFF
ALWAYS

Input

modality attribute, block names

Example

MOM_force_block Once linear