Affected versions: Autodesk FlexSim 2027 (27.0.0), legacy FlexSim 2026 LTS (26.0.1)
When using `/maintenance runscript /scriptpath ABSOLUTE-PATH` invocation, as documented in "Controlling FlexSim Externally" (https://help.autodesk.com/view/FLEXSIMIN/2027/ENU/?guid=FlexSim_User_Manual_reference_developeradvan...), invocation of the scripts which contain a hyphen in their name does not work.
How to reproduce (PowerShell):
New-Item -Type Directory -Path C:\abcdefgh_1\abcdefgh_2\abcdefgh_3\abcdefgh_4\abcdefgh_5\
New-Item: An item with the specified name C:\abcdefgh_1\abcdefgh_2\abcdefgh_3\abcdefgh_4\abcdefgh_5 already exists.
Set-Content -Force -Path C:\abcdefgh_1\abcdefgh_2\abcdefgh_3\abcdefgh_4\abcdefgh_5\TESTSCRIPT.txt -value 'fileopen(documentsdir() + "lastpdir.txt", "w"); fpt(pdir()); fileclose(); cmdexit();'
& 'C:\Program Files\Autodesk\FlexSim 2027\program\flexsim.exe' /maintenance disablemsg_runscript /scriptpath C:\abcdefgh_1\abcdefgh_2\abcdefgh_3\abcdefgh_4\abcdefgh_5\TESTSCRIPT.txt # OK
Set-Content -Force -Path C:\abcdefgh_1\abcdefgh_2\abcdefgh_3\abcdefgh_4\abcdefgh_5\TEST-SCRIPT.txt -value 'fileopen(documentsdir() + "lastpdir.txt", "w"); fpt(pdir()); fileclose(); cmdexit();'
& 'C:\Program Files\Autodesk\FlexSim 2027\program\flexsim.exe' /maintenance disablemsg_runscript /scriptpath C:\abcdefgh_1\abcdefgh_2\abcdefgh_3\abcdefgh_4\abcdefgh_5\TEST-SCRIPT.txt # FAILUREThe first invocation works, the second starts FlexSim, but it doesn't exit run the script and doesn't exit.
The only difference between the first and the second invocation is '-' in the script path.
commandlineparam("scriptpath") in FlexSim, returns D:\abcdefgh_1\abcdefgh_2\abcdefgh_3\abcdefgh_4\abcdefgh_5\TEST instead of D:\abcdefgh_1\abcdefgh_2\abcdefgh_3\abcdefgh_4\abcdefgh_5\TEST-SCRIPT.txt.
Can't find what you're looking for? Ask the community or share your knowledge.