Update model requirements document paths and file names
rmidocrename(model_handle, old_path, new_path)
rmidocrename(model_name, old_path, new_path)
rmidocrename(model_handle, old_path, new_path) collectively
updates the links from a Simulink® model to requirements files whose names or locations have changed.
model_handle is a handle to the model that contains links to the
files that you have moved or renamed.
old_path is a character vector
that contains the existing full or partial file or path name.
new_path is a character vector with the new full or partial file
or path name.
rmidocrename(model_name, old_path, new_path) updates the links to
requirements files associated with
model_name. You can pass
rmidocrename a model handle or a model file name.
When using the
rmidocrename function, make sure to enter specific
character vectors for the old document name fragments so that you do not inadvertently
modify other links.
For the current Simulink model, update all links to
requirements files that contain the character vector
'project_0220', replacing them with
rmidocrename(gcs, 'project_0220', 'project_0221') Processed 6 objects with requirements, 5 out of 13 links were modified.
To update the requirements links one at a time, for each model object that has a link:
For each object with requirements, open the Requirements Traceability Link Editor by right-clicking and selecting Requirements Traceability > Open Link Editor.
Edit the Document field for each requirement that points to a moved or renamed document.
Click Apply to save the changes.