Displays a message in an information box. The message can include one or more parameter values.
The unit used to valuate a
Parameter takes into account the unit which has been set in
Tools > Options > General > Parameters and Measures > Units tab.
i.e.
Message(#,3mm) is displayed
as "3mm".However, if you specify
|
Message(String [# String1 # String2 ..., Param1Name,
Param2Name, ...] ) : Void
The Message function takes one required argument and several optional arguments depending on whether parameter values are to be displayed in the message.
Arguments | Description | ||
String | Required. String to be displayed in the information box (must be put in quotes). | ||
# String1, Param1Name... | Optional. When parameter values are to be displayed within the message,
the arguments must be specified as follows:
|
Use the "|" symbol to insert a carriage return in a message.
Message("External radius is: # | Internal Radius is: #", PartBody\Sketch.1\Radius.3\Radius, PartBody\Hole.1\Diameter)
Note that this function can be used along with the buildMessageNLS function
Message
(BuildMessageNLS("KwrCATCatalog.CATNls","Zero")) |
Note that you can use the Message function
together with the BuildMessageNLS
function for your question to display in your language. To use this
function, use the following syntax: Message(BuildMessageNLS ("x","xx",a,b))
|
|
Messages returned by the Message operator are
returned only at the end of rules executions. The order in which they
are returned is identical to the order in which they were sent. It is
the only way to make sure that messages are not displayed twice. |
Displays a message in a dialog box, waits for you to click a button and returns a value indicating which button you clicked (true if Yes was clicked, false if No was clicked)
Question(String [# String1 # String2 ..., Param1Name,
Param2Name, ...] ): Boolean
The Question function takes one required argument and several optional arguments depending on whether parameter values are to be displayed in the message.
Arguments | Description | ||
String | Required. String to be displayed in the dialog box (must be put in quotes). | ||
# String1, Param1Name... | Optional. When parameter values are to be displayed within the message,
the arguments must be specified as follows:
|
Use the "|" symbol to insert a carriage return in a prompt.
Boolean2 = Question("SketchRadius is # | Do you want to change this value ?", PartBody\Sketch.1\Radius.3\Radius )
Note that you can use the Question function
together with the BuildMessageNLS
function for your question to display in your language. To use this
function, use the following syntax: question(BuildMessageNLS ("x","xx",a,b))
|
|
Questions launched by the Question operator
are executed only when parsing the evaluation. |
Enables you to write information in a file for debugging purposes for
example. To do so, valuate the CATKnowledgeTracePath
variable (for
example, set CATKnowledgeTracePath=E:\Temp\CATKnowledge_UserDefined.txt
).
If the variable is empty, the default name of the trace file is
CATKnowledgeTrace_YYYY-MM-DD_HH-MM-SS.txt. This file is located in the CATTemp
directory (For example: C:\Documents and Settings\user\Local
Settings\Application
Data\DassaultSystemes\CATTemp\CATKnowledgeTrace_2005-8-8_16-28-20.txt).
Trace(level:Integer, message:String, argument:Literal, ...) : VoidType
Where:
Note that:
Trace(Integer.1 , "MyMessage... Param1: #,
Param2: #", Integer.1, String.1) |
The generated .txt file looks like the one below:
When CATIA translates a value with a given unit into a real number, the conversions done are based on MKS International system. For example, a real number conversion of length in "mm" are performed by "m" (for Meter). |