Add new shared code source files to existing shared code folder
copies, for example, shared utility files from
sourceFolder to a
destinationFolder provided that the files do not exist
destinationFolder. The function:
Identifies files in both folders that have identical names but different content.
The function does not overwrite these files in
In the Command Window, you see a
compare link for each file. To
examine differences by using the Comparison tool, click the link.
sourceFolder files that the function intends to copy
and seeks confirmation. When you provide confirmation, the function copies the files
destinationFolder. By default, the destination of the copied
files is a subfolder that corresponds to the release in which the files were created,
This example shows how to copy source files from a shared utilities folder to a shared code folder.
sourceFolder = fullfile(pwd,'R2015bWork','slprj','ert','_sharedutils'); existingSharedCodeFolder = fullfile(pwd,'SharedUtilCode'); sharedCodeUpdate(sourceFolder, existingSharedCodeFolder);
This example shows how to copy source files from a shared utilities folder to a specified subfolder in the shared code folder.
sourceFolder = fullfile(pwd,'R2015bWork','slprj','ert','_sharedutils'); existingSharedCodeFolder = fullfile(pwd, 'SharedUtilCode'); destinationSubfolder = 'mySub' sharedCodeUpdate(sourceFolder, existingSharedCodeFolder,... 'ExistingCodeSubfolder', destinationSubfolder);
This example shows how to copy shared utility files from a relocated generated code folder to an existing shared code folder.
Specify path to shared code folder that you want to update.
pathToExistingSharedFolder = 'C:\mySharedCodeFolder';
Specify the full path to the relocated generated code folder
anchorFolder = 'C:\myWorkFolder'; relocatedCodeFolder = fullfile(anchorFolder, 'P1_ert_rtw');
Update the existing shared code folder.
sourceFolder— Source folder
File path to folder with shared code files that you want to add to existing shared code folder.
destinationFolder— Existing shared code folder
File path to existing shared code folder.
destinationSubfolder— Destination subfolder
Destination subfolder in existing shared code folder.
buildFolder— Build folder
Path to a build folder (Simulink) that contains previously generated model code.
configurationSetOrModel— Configuration set or model
Simulink configuration set or model that uses an existing shared code folder specified by
protectedModel— Protected model file
File path for protected model. File name of protected model must have