List of Utility Functions The following pages document the utility functions. The functions are presented in alphabetical order, as listed in the following table. Function Description stm_action_of_reaction Extracts the action part of the specified reaction stm_add_attribute Enables you to add new attributes to a property element. stm_backup Creates a back up of the workarea in a session to a selected directory. stm_commit_transaction Closes any open database transactions. It is done explicitly if you are working in the self_transaction mode. stm_decode_color Decodes the the color’s value as it is retrieved from the database. stm_delete_attributes Removes an attribute entry from the properties for an element. stm_dispose_all Disposes of all the records that were previously allocated and retrieved. stm_dispose_graphic Disposes of the record of type stm_xx_graphic that was previously allocated and retrieved by the function stm_r_xx_graphic (). stm_dispose_text Disposes of the record of type stm_xx_text, which was previously allocated and retrieved by the function stm_r_xx_text(). stm_do_command_line Sends a message to the open Rational Statemate main tool to execute a command line using the same syntax of STMM CLI. stm_exit_simulation Allows exit of a Simulation session by profile name. stm_finish_uad Completes the information retrieval session so the database is closed for transactions. This is performed after the last Dataport function call. stm_frm_Reset_id Resets the Framemaker ID's counter (after calling stm_plot using Framemaker). stm_get_db_status Returns a number of type stm_id. This number is changed when the database is changed. stm_init_uad Initializes the database for information retrieval by the Dataport functions, and checks the user access rights and user license. stm_internal_refresh Notifies STM that data was changed outside the tool. stm_list_add_id_element Adds a new element to a list of element IDs. stm_list_add_id_element_to_list Adds a new element to a list of element IDs. stm_list_add_ptr_element Adds a new element to a list of element pointers. stm_list_add_ptr_element_to_list Adds a new element to a list of element pointers. stm_list_contains_id_element Determines whether the specified ID appears in the given list. stm_list_contains_ptr_element Determines whether the specified item appears in the given list. stm_list_create_ids_list Creates a list of items using their IDs. stm_list_create_ptr_list Creates a list of items. stm_list_create_id_list_with_args Creates a list of items using the specified IDs. stm_list_create_ptr_list_with_args Creates a list of items. stm_list_delete_id_element Deletes the specified element from a list of element IDs. stm_list_delete_id_element_from_list Deletes the specified element from a list of element pointers. stm_list_delete_ptr_element_from_list Deallocates the memory used by the specified list. stm_list_extraction Extracts the elements from the input list. stm_list_extraction_by_chart Extracts the elements from the input list that belong to the specified chart. stm_list_extraction_by_chart_id Extracts the elements from the input list that are defined in the pecified chart. stm_list_extraction_by_type Extracts elements of the specified type from the given list of Rational Statemate elements. stm_list_first_id_element Returns the first item appearing in the list passed as an input argument. stm_list_first_ptr_element Returns the first item appearing in the list passed as an input argument. stm_list_intersect_ids_lists Extracts elements that are common to the two specified input lists. stm_list_intersect_ptr_lists Extracts elements that are common to the two specified ptr lists. stm_list_last_id_element Returns the last item appearing in the list passed as an input argument. stm_list_last_ptr_element Returns the last item appearing in the list passed as an input argument. stm_list_length Returns the length of the specified list. stm_list_load Loads a previously saved list into memory to be used by the program. stm_list_next_id_element Returns the next item appearing in the list passed as an input argument. stm_list_next_ptr_element Returns the next item appearing in the list passed as an input argument. stm_list_previous_id_element Returns the previous item appearing in the list passed as an input argument. stm_list_previous_ptr_element Returns the previous item appearing in the list passed as an input argument. stm_list_purge Erases the input list’s pointers and the list elements. stm_list_sort Alphabetically sorts the specified list of strings. stm_list_sort_alphabetically_by_branches Alphabetically sorts the specified list of strings by branches. stm_list_sort_alphabetically_by_levels Alphabetically sorts the specified list of strings by levels. stm_list_sort_by_attr_value Sorts the specified list of Rational Statemate elements by the value of the given attribute. stm_list_sort_by_branches Sorts the specified list of hierarchical Rational Statemate elements by branches. stm_list_sort_by_chart Alphabetically sorts the input list of named Rational Statemate elements, by the name of the chart to which they belong. stm_list_sort_by_levels Alphabetically sorts the input list of named Rational Statemate elements, by the name of the chart to which they belong. stm_list_sort_by_name Sorts the specified list of Rational Statemate elements alphabetically by name. stm_list_sort_by_synonym Sorts the specified list of Rational Statemate elements alphabetically by their synonyms. stm_list_sort_by_type Sorts the specified list of Rational Statemate elements by type. stm_list_subtract_ids_lists Creates a new list of those elements of the first input list that are not found in the second input list. stm_list_subtraction_ptr_lists Creates a new list of those elements of the first input list that are not found in the second input list. stm_list_subtract_ids_lists Creates a new list of those elements of the first input list that are not found in the second input list. stm_list_union_ids_lists Merges the elements of two specified ids lists. stm_list_union_ptr_lists Merges the elements of two specified ptr lists. stm_load Loads a chart file (or any other configuration item file) into the current workarea. stm_multiline_to_one Converts the specified multiline string (with new lines) to a one-line string (without the new lines). stm_multiline_to_strings Converts the specified multiline expression to a list of strings. stm_open_truth_table Opens a Truth Table that is connected to the specified element and highlights the specified line in it. stm_plot Generates a plot file with the indicated parameters, such as plot size, output device, and so on. stm_plot_ext May return one of two status codes. stm_plot_hyper_exp Generates the hyperlinks in a sequence diagram. stm_plot_with_autonumber Prints a sequence diagram with numbered scenarios. stm_plot_with_break Breaks a sequence diagram across multiple pages. stm_plot_with_headerline Prints a sequence diagram with the names of lifelines on every page. stm_r_global_interface_report Return the global interface report for the elements in the input list stm_r_local_interface_report Return the local interface report for the elements in the input list. stm_run_simulation_profile Sends a message to Rational Statemate to open and execute a Simulation profile by the name passed as a parameter. stm_save Saves a chart (or any other configuration item file) from the current workarea to an external file. stm_start_transaction Enables transaction operations on the database. stm_start_transaction_rw Enables read/write transaction operations on the database. stm_trigger_of_reaction Returns the trigger part of a reaction (label of transition or static reaction). stm_uad_attribute Writes the predefined attribute report to the specified output file. stm_uad_dictionary Writes the predefined property report to the specified output file. stm_uad_interface Writes the predefined attribute report to the specified output file. stm_uad_list Writes the predefined list report to the specified output file. stm_uad_n2 Writes the predefined N2-chart report to the specified output file. stm_uad_protocol Writes the predefined protocol report to the specified output file. stm_uad_resolution Writes the predefined resolution report to the specified output file. stm_uad_state_interface Writes the predefined state interface report to the specified output file. stm_uad_structure Writes the predefined structure report to the specified output file. stm_uad_tree Writes the predefined tree report to the specified output file. stm_unload Unloads (deletes from the current workarea) a chart or any other configuration item file. stm_unload_all Unloads all charts from the current workarea and clears all database fields.
The following pages document the utility functions. The functions are presented in alphabetical order, as listed in the following table.
self_transaction
stm_xx_graphic
stm_r_xx_graphic ()
stm_xx_text
stm_r_xx_text
stm_plot
stm_id