I have to perform a refresh to see the script changes
The scripts provide special functions that allow you to make changes to the model through a transaction.
If you have to refresh the Modeler views to see the changes made by a script, the script that is making changes to the model is not within a special function.
To resolve this problem, locate the script that is making changes to the model, and move that script to within the special function that is appropriate for the script type. The functions that make changes to a model through a transaction are as follows:
For Diagram Toolbar Scripts - use the OnFinished script function. See:
For Double-Click Scripts - use the CommitDoubleClick script function. See:
For Menu Command Scripts - use the CommitMenu and AfterMenuCommit script function. See:
For On Drop Scripts - use the OnDrop script function. See:
For Utility Scripts - use the CommitUtility script function. See:
Making changes to the model through the preceding functions also minimizes disruption to other users because of item locking. In addition, you will be able to undo the changes made by the script.
* 
On Delete and Derivation Script scripts do not have any functions specifically for making changes to the model.