Save Artifact Link Files (.slmx) on seperate path as their artifacts.
22 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lorenz
am 18 Sep. 2025
Kommentiert: Lorenz
am 29 Sep. 2025 um 12:11
In our project, we maintain separate Git repositories for requirements (Requirement files .slreqx), the system model (Simulink models .slx), and verification (Simulink Testfiles .mldatx).
The requirements and system model repositories are included as Git submodules within the verification repository.
Because submodules should remain unchanged, I would prefer to store the artifact link files in the main (verification) repository. However, this causes an issue: the link files (.slmx) end up with different paths than the artifact files, which results in the following error when tracing artifacts:
alm:artifact_service:InvalidRelativePath
My questions are:
- Is it possible to store .slmx files in a different path than their corresponding artifacts?
- Or, is there a better practice for handling this setup when working with submodules?
Any suggestions would be greatly appreciated!
0 Kommentare
Akzeptierte Antwort
Aditya
am 24 Sep. 2025
Hi Lorenz ,
You can store .smlx files in a different path than thier corresponding artifacts.A workaround would be to have a callback that's triggered right after the model is saved. This callback would move the ".SLMX" file from the current directory to the "reqs" folder. To implement this, go to the "Model Explorer", and post the following code into the "PostSaveFcn" Callback:
% Define req file name
filename = "example_model~mdl.slmx";
% Define the destination folder
destinationFolder = 'reqs';
% Construct the full paths
sourcePath = fullfile(pwd, filename);
destinationPath = fullfile(pwd, destinationFolder, filename);
% Move the file
movefile(sourcePath, destinationPath);
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!