Script Editor and Text Editor Attributes
View attributes for the Script Editor and Text Editor views. Both views are identical, except that only a single instance of the Script Editor can exist at a time, and the Script Editor includes the Script History window. Not all attributes support both setting and getting. Check the third column in the table.
|
Attribute Name |
Description |
Supports |
|
entrypoint |
A search string. The script editor automatically scrolls to the first line containing this string, if found. The string can be in any position in the document (it is not necessary to specify the start of the line). Possible Values: • <any string> Any string in the specified file. |
• Set |
|
filename |
The path and name of a text or script file to open when the script editor is displayed. See the ViewCollection object for an example using this attribute. Possible Values: • <any valid path and filename> Any path and filename pointing to a file on your system (including UNC paths). For example, "C:\temp\dump_values.vbs" or "\\sysadmin\public\create_rigs_for_jennifer.pls" |
• Get • Set |
|
newfilename |
Creates a new file in the script editor and optionally set the content with code. Possible Values: • <any valid scripting code> Optional source code to set the editor with. If no code is passed the editor is just reset with a blank file. |
• Set |
|
savefilename |
Saves the content of the editor in a specifed filename. Possible Values: • <any valid path and filename> Any path and filename pointing to a file on your system (including UNC paths). For example, "C:\temp\dump_values.vbs" or "\\sysadmin\public\create_rigs_for_jennifer.pls" |
• Set |
|
curlinenum |
Gets the line number of the current cursor position. Can also be used to set the current cursor position to the beginning of the specified line. The first line is considered line 1 (not 0). Possible Values: • <a number> Line number of the current cursor position |
• Get • Set |
|
errorlinenum |
Draws a red border around the specified line and makes sure that it is visible. The first line of the file is considered line 1 (not 0). Possible Values: • <a number> Line number in the file |
• Set |
|
text |
Gets or sets the entire contents of the editor as a single string. Can also be used to set the text content, in which case the existing content is lost. Note: On Windows the "\r\n" characters are used to mark new line, while on Linux only "\n" is used. Possible Values: • <a string> Content of the script or text file |
• Get • Set |
|
selectedtext |
Gets access to the currently selected (highlighted) text, if any. Possible Values: • <a string> Content of the selected text, or an empty string |
• Get |
|
inserttext |
If there is a text selection then setting this property will replace the existing selection with the new text. If there is no selection then the text is inserted at the current cursor position. Possible Values: • <a string> A string to append to the end of the script or text file |
• Set |
|
historyline |
Returns the current line of the script history, or if there is a selection it returns that instead. This attribute is only available on the Script Editor view, not the Text Editor view. It is also available on the Script History view when the Script History exists in the layout as a view of its own. Possible Values: • <a string> Insert at current cursor position, or replace selected text |
• Get |
![]()
|
See View Attributes for a complete list of types of attributes that you can use when customizing your Relational Views. |
Autodesk Softimage v7.5