Customization > Automation Interface > Functions > For User Interface > Functions for Text Editing Window > OpenTextEditor function (automation interface)
OpenTextEditor function (automation interface)
Syntax:
OpenTextEditor("<id>", "<property name>")
Where:
<id> is a string that specifies the id of the item that owns the property.
<property name> is a string that specifies can be as follows:
Body for an Operation.
Full Text for a Note, Comment, Constraint and OSD Step Symbol.
Rtf for a Text Diagram.
Script for a Script.
EAB for an Event Actions Block.
Guard for a Guard Condition.
Event for a Change Event.
The OpenTextEditor function opens a text editor window or the Code Editor for you to change the value of a property.
The OpenTextEditor function can be used only with item properties that can be changed through a text editor window or the Code Editor in Modeler. For example, you can use the OpenTextEditor function with the Body property of an Operation, because in Modeler you can open the Body property of an Operation in the Code Editor.
You can use the CloseTextEditor and CloseAllWindows functions to close a text editor window or Code Editor window.
Examples
This example opens the Body property of Operation1 in a Code Editor window:
Set objItem Dictionary.Item("Operation","Operation1")
Call Studio.OpenTextEditor(objItem("Id"), "Body")
This example opens the text editor for a Text Diagram named Text Diagram1:
Set objDiagrams = ActiveProject.Item("Diagrams")
Set objTD = objDiagrams.Item("Text Diagram","Text Diagram1")
Call Studio.OpenTextEditor(objTD("Id"), "Rtf")
Was this helpful?