Create a project from source control
If a .p4config file is present, it is automatically loaded and your Simulink project is connected to the Helix Server.
Create a project from source control and connect to the Helix Server:
- Go to the Simulink Start Page and select the New tab. From the Projects section of the sidebar, select From Source Control > Helix Core 2016b.
- Set the Sandbox path to your Helix Server Workspace root, this is the location on your local machine you want to populate with the versioned files.
- The Repository path needs to be entered as a URI for the Helix Server.
- From the New Project From Source Control dialog, click Change to open the Helix Core Connection dialog.
- Enter your Helix Core Server, Username, and Workspace details and click Connect.
- Click OK to close the dialog and return to the New Project From Source Control dialog. The URI is automatically added to the Repository path of the New Project From Source Control dialog.
- Click Retrieve to fetch the files from the Helix Server. If you are prompted to create the Sandbox directory, click Yes.
- If you do not have a valid ticket session for the Helix Server, you will be prompted for your password.
- If the Workspace specified in your connection does not exist, you are prompted to create one.
Alternatively, you can select the Project from Helix Core R2016b Simulink template on the New tab.
The URI is automatically generated and verified when Simulink successfully connects to the Helix Server.
If Helix Authentication Service is configured for your Helix Server a web page will open and you will be directed to the sign in process used by your Identity Provider (IdP) when you connect to the Helix Server.
Set your Helix Server Workspace settings, options are:
- AllWrite: select to leave all files writable on the client workspace. By default, only files opened by p4 edit are writable. If set, files might be clobbered as a result of ignoring the Clobber option (see below).
- Clobber: select to permit p4 sync to overwrite writable files on the client workspace. noclobber is ignored if allwrite is set.
- Compress: select to compress data sent between the client workspace and Helix Server. This is used to speed up slow connections.
- Locked: select to allow only the client workspace owner to use or change the client spec. Prevents the client spec from being deleted or unloaded.
- Modtime: select to make p4 sync and p4 submit preserve file modification times, as with files with the +m type modifier. For more information about Modtime, see p4 help filetypes. With nomodtime, file timestamps are updated by sync and submit operations.
- RmDir: select to delete a workspace folder if all the files contained in the folder are removed.
If you are connecting to a Stream A "branch" with built-in rules that determine what changes should be propagated to files in a stream depot, and in what order they should be propagated. A stream spec defines a stream. A user creates a stream spec by using either the "p4 stream" command or in P4V with File > New Stream. In P4V, stream specs are visible in the Streams Graph and the Streams tab. depot enter your stream details, if you are connecting to a classic depot enter your View Mapping A single line in a view, consisting of a left side and a right side that specify the correspondences between files in the depot and files in a client, label, or branch. See also workspace view, branch view, and label view. details.
- Stream: if using streams, specify the full Helix Server depot path for the stream that you want to populate your workspace from.
Stream at change (optional): enter a changelist number to populate your workspace based on the point in time that is represented by that changelist.
- View Mapping: map files in the depot to your client workspace. This defines the files that you want in your client workspace and specifies where you want them to reside. The left-hand side specifies one or more files in the depot. The right-hand side specifies one or more files in the client workspace. For details about client view syntax, see the Specify mappings chapter in the Helix Core Command-Line (P4) Guide.
- Get Latest revision: populates the workspace with the most recent revision of the files in the Helix Server. Typically this is the option you would select.
- Specify a revision: populates the workspace with the revision of the files you specify from the Helix Server.
- Advanced Sync Options, these options are only used if you are updating an existing client workspace:
- Force Operation (p4 sync -f): forces the sync even if the workspace already contains the file at the specified revision.
- Safe Update (p4 sync -s): performs a safe sync by comparing the content in your client workspace against what was last synced. If the file was modified outside of the control of Helix Server, an error message is displayed and the file is not overwritten.
Click OK to populate your workspace.
The Set up Project (Step 1 of 2) dialog is displayed.
To add folders and files to your Simulink project, do one of the following:
- to add all of the files in a folder, click Add Folder..., select the folder, and click Open to move on to the next step.
- to add the files in a folder and all of the files in its subfolders, click Add with Subfolders..., select the folder, and click Open to move on to the next step.
The Set up Project (Step 2 of 2) dialog is displayed.
Simulink creates/updates the project files because of the change and they are displayed in the Modified tab.
You can add further files and folders to your project after you have created your project with the Simulink Helix Server menu. For instructions on adding files to your project, see Simulink Helix Server menu.