Salome HOME
Issue #3140: Add show/hide Isos menu item.
[modules/shaper.git] / src / ParametersPlugin / doc / parameterFeature.rst
index f0c4785c10ff7c179ee968cde59e8ce1f058b2da..efd7849bad01508e9b21fec8c7f3a320bc65dd84 100644 (file)
@@ -1,3 +1,55 @@
+.. _parameter:
+.. |expression.icon|    image:: images/expression.png
 
 Create parameter
 ================
+
+The parameter can be defined in form *variable=expression*.
+
+To create a parameter in the active partset or part:
+
+#. select in the Main Menu *Part - > Parameter* item or
+#. click |expression.icon| **Parameter** button in the toolbar:
+
+
+The following property panel appears.
+   
+.. image:: images/parameter.png
+   :align: center
+
+.. centered::
+   Parameter property panel
+
+**Input fields**:
+
+- |expression.icon| defines parameter name following the naming rules of the python language for variables;
+
+- panel **Expression** evaluates the expression input manually as a real number by python *eval()* function. In the simplest case an expression is a real number. Some standard python modules (like math) are imported by default before evaluation.
+
+- **Comment** contains any text. This field is optional.
+
+
+The property panel checks validity of the expression. For an invalid expression **Apply** button is disabled and an error message generated by python interpreter during the evaluation is shown in the status bar and in pop-up of **Apply** button.
+
+**TUI Command**:
+
+.. py:function:: model.addParameter(Part_doc, Name, Value, Comment)
+
+    :param part: The current part object
+    :param string: The parameter name
+    :param number: The parameter value
+    :param string: The parameter comment
+    :return: Created object.
+
+**See Also** a sample TUI Script of a :ref:`tui_parameterFeature` operation.
+
+Result
+------
+
+The created parameter and its current value are displayed in the Object Browser, in a special section **Parameters**. 
+
+.. image:: images/object_browser_parameter.png
+   :align: center
+
+.. centered::
+   **Parameter** in object browser