# Working with Projects

When creating ApplicationObjects or reusable primitives, you manage your development work in *projects*. ArchestrA Object Toolkit projects are simply Visual Studio projects of a special type. You create and manage them just like other Visual Studio projects.

You create a project for every ApplicationObject or reusable primitive that you want to create. Visual Studio then creates a solution folder with subfolders for the projects corresponding to each of your object’s components and primitives. That solution folder contains all code related to the ApplicationObject or reusable primitive you’re developing.

## Creating a Project

When you create a project, the ArchestrA Object Toolkit creates all files and basic structures that you need to define your ApplicationObject or reusable primitive. The steps to create a project are the same for ApplicationObjects and reusable primitives.

**To create a project**

1. Open Microsoft Visual Studio.
2. On the **File** menu, point to **New** and then click **Project**. The **New Project** dialog box appears.
3. In the **Project types** list, expand **Visual C#** and click **ArchestrA**.
4. In the **Templates** pane, click **ArchestrA Object**.
5. In the **Name** box, enter a name for the project. This is also used as the name of your object. You can change the object name later.
6. In the **Location** box, enter the path where you want the project folder to be created.
7. Leave the **Create directory for solution** check box selected as well.
8. Click **OK**.

Visual Studio creates a solution folder for the ArchestrA Object Toolkit project. The solution folder contains the following subfolders:

| Subfolder | Contents |
| --- | --- |
| <Project name> | Code files that define the object shape and attributes |
| <Project name>Configtime | Code files for the object’s config time (“package”) code |
| <Project name>Editor | Code files for the custom object editor UI and code |
| <Project name>Runtime | Code files for the object’s run time code |
| Output | Build output (.aaPDF or .aaPRI files, .aaDEF file). This folder is created when you build your project for the first time. |

When you add a local primitive to an ApplicationObject, the ArchestrA Object Toolkit adds a subfolder to the solution folder that contains the code files for that primitive. The primitive folder, in turn, has different subfolders for config time and run time code similar to the ones described above. When you add another primitive to that primitive, the ArchestrA Object Toolkit creates a subfolder in the primitive subfolder, and so on. For limitations due to this approach, see Object Design Considerations.

## Opening an Existing Project

When you open an existing ArchestrA Object Toolkit project in Visual Studio, the ArchestrA Object Toolkit windows appear, and all related commands are available. When you open any other type of project, these windows and commands are not available, except for some commands that are not project-specific.

**To open an existing project**

1. On the **File** menu, point to **Open** and then click **Project/Solution**. The **Open Project** dialog box appears.
2. Select the solution file you want to open and click **Open**.

Visual Studio opens the project.

## Moving or Deleting Projects

To move or delete an ArchestrA Object Toolkit project, simply move or delete the entire Visual Studio solution folder. When moving a project, pay attention to the following:

- The Windows folder structure only allows paths to be a certain length. If you move a project with a long hierarchy of child primitives (which are stored in nested subfolders) to an already long path, some of the paths may become too long.
- After you have moved the project, check your code for any relative references to dependent files that may need updating.
- If you are moving a project from one computer to another, make sure that all references are available on the new computer.

## Editing Projects in Code or in the ArchestrA Object Toolkit Designer

The ArchestrA Object Toolkit provides a graphical Object Designer that makes it easy to configure the properties and attributes of your ApplicationObject (or reusable primitive). We recommend that you edit your objects using this Object Designer. However, you can always edit all aspects of your object directly in the underlying code.

The code and the data you see in the Object Designer are always synchronized. For example, when you change the properties of an attribute in the code, you see the updated property values the next time you open the Object Designer, and vice versa.

This manual describes how to edit ApplicationObjects and reusable primitives by using the Object Designer. For more information on editing properties and attributes in code, see the *ArchestrA Object Toolkit Reference Guide*.

For information on opening the Object Designer interface, see Object Designer Window.
