sharedCodeUpdate - Add new shared code source files to existing shared code

folder - MATLAB (original) (raw)

Add new shared code source files to existing shared code folder

Syntax

Description

sharedCodeUpdate([sourceFolder](#bvdu21f-sourceFolder), [destinationFolder](#bvdu21f-destinationFolder)) copies, for example, shared utility files from sourceFolder to a subfolder in destinationFolder provided that the files do not exist within destinationFolder. The function:

example

sharedCodeUpdate([sourceFolder](#bvdu21f-sourceFolder), [destinationFolder](#bvdu21f-destinationFolder), 'ExistingCodeSubfolder', [destinationSubfolder](#bvdu21f-destinationSubfolder)) copies files to the subfolder that you specify.

example

sharedCodeUpdate([buildFolder](#d126e29145), [destinationFolder](#bvdu21f-destinationFolder)) copies shared code source files from the shared code location associated withbuildFolder.

sharedCodeUpdate([buildFolder](#d126e29145), [configurationSetOrModel](#d126e29165)) copies shared code source files to the folder specified by the'ExistingSharedCode' parameter of a Simulink® configuration set or model.

sharedCodeUpdate([protectedModel](#d126e29188), [destinationFolder](#bvdu21f-destinationFolder)) copies shared utility files for the protected model to the shared code folder.

Examples

collapse all

This example shows how to copy source files from a shared utilities folder to a shared code folder.

sourceFolder = fullfile(pwd,'EarlierWork','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,'EarlierWork','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 folderP1_ert_rtw.

anchorFolder = 'C:\myWorkFolder'; relocatedCodeFolder = fullfile(anchorFolder, 'P1_ert_rtw');

Update the existing shared code folder.

sharedCodeUpdate(relocatedCodeFolder, pathToExistingSharedFolder);

Input Arguments

collapse all

File path to folder with shared code files that you want to add to existing shared code folder.

File path to existing shared code folder.

Destination subfolder in existing shared code folder.

Simulink configuration set or model that uses an existing shared code folder specified by the 'ExistingSharedCode' parameter.

File path for protected model. File name of protected model must have.slxp extension.

Version History

Introduced in R2016b