I have seen comments on this forum like "Repository.Models.Refresh() doesn't work". In my experience it did work an other scripts but not in my current Jscript project.
My Jscript imports a word document into Sparx packages and Artifacts. Each time I create a new package, I update the Package.TreePos with an incremental counter so that packages are sequenced correctly. After the MS-Word document has been imported, I execute Repository.Models.Refresh(), but it is seemingly being ignored. Nothing changes.
If I close the Sparx project and re-open the project file, only then I can see the packages in the correct sequence as per Package.TreePos.
Why is Repository.Models.Refresh() failing?