OMSimulator icon indicating copy to clipboard operation
OMSimulator copied to clipboard

Simple swap between ssv files

Open larsviktorlarsson opened this issue 11 months ago • 7 comments

I have an ssp with an ssd with links to ssv files in resources folder inside the ssp. If I want to swap one of the ssv:s to another one that is included in the ssp. For instance a command:

oms.swapResource("resources/ManoverOS_variant_0.ssv","resources/ManoverOS_variant_1.ssv") to swap from ManoverOS_variant_0.ssv to ManoverOS_variant_1.ssv in the currently active .ssd.

I have tried the addResource and deleteResource functions, but they seem to assume the new ssv file is provided outside the ssp.

The ssp as zip file: test_cases.zip

Note: The ssd "ManoverOS_tcv_1.ssd" is the same as "SystemStructure.ssd", but with swapped ssv references (made before packing the ssp, which is how I currently handle this problem).

larsviktorlarsson avatar Feb 11 '25 08:02 larsviktorlarsson