A13 - Using Code Builder to Manage OC files in OPX

A13 - Using Code Builder to Manage OC files in OPX

ORG-10971

A Packages folder is added in workspace in Code Builder. This folder is used to manage packages. This folder contains only folders, and each folder represents a disk folder in User Files Folder. A special folder named Common is used for holding files that are shared between all packages. Each package folder contains a subfolder named "User Files", which contains files that are in the User Files Folder.


Context menu of "Packages" folder

When you right click on the Packages folder, there is a context menu with two items:

  1. Add Existing Folder... - for choosing a folder that already exists in the User Files Folder
  2. New - for creating a new folder named Untitled which also creates a new disk folder named Untitled under User Files Folder. Repeating New will create enumerated Untitled folders.

Context menus of each package folder except Common.

  1.  Add FilesThis is used to add files to the folder. Each package folder represent a disk folder in User Files Folder. If an added file is from your User Files Folder, then the file is placed in the "User Files" subfolder to indicate where it will be installed. If selected files are not already in the User Files Folder and not in User Files Folder\packageFolder\, they will be copied to User Files Folder\packageFolder\ folder.
  2. Show Full Path - Show or hide the full path of the files.
  3. Rename - Rename the package folder.
  4. Delete - Delete the package folder. If a disk folder exists, you will be asked if you want to delete the disk folder and files also.
  5. Duplicate - Duplicate the package folder and its files.
  6. Generate - Launch the Package Manager and add the files from the package folder. If an OPX in the User Files Folder with the same name exists, that OPX will be loaded and all files removed before adding all the files from the package folder.
  7. Generate with Common - Same as Generate, but the files in the Common folder are also added.

Note: Because Common is not a package, its Context menu has only the first two items. This is also true for User Files folder found in each package.

Scenario

You have some code already that you would like to use to create an OPX, but manage in Code Builder.

To move into Code Builder as a package:

  1. Right-click on Packages and select "Add Existing Folder..."
  2. Browse to the folder where your source files are and click OK
  3. Right-click on the newly added folder and choose "Add Files..."
  4. Browse to the folder where your source files are and select one or more files to add and click Open.

One file is a Graph Template you want to be available to users without having to go through your tools.

  1. Right-click on the "User Files" folder under your package folder and choose "Add Files..."
  2. Select the file or files and click Open

When distributed, files in the special User Files folder under each package folder will be placed directly in the User Files Folder.

You develop lots of tools for your group and have some files you tend to include in any package you make.

  1. Right-click on the Common folder under Packages and choose "Add Files..."
  2. Add any files that are found in multiple packages
  3. If any files are common to multiple packages but should be put in the User Files Folder, add them to Common's "User Files"

You can now edit and debug your source file in Code Builder. When you are ready to create an OPX, right-click on a package folder and choose "Generate" which will open Package Manager with the files in your package loaded. If you need to include Common files, choose "Generate with Common".