# Copy Templates Between Tunnels When a project contains multiple tunnel alignments that share the same or similar design profiles, you can copy templates from one tunnel to another instead of recreating them manually. ## Opening the Copy Templates dialog From the ribbon, go to **Template > Copy**. This opens the Copy Templates dialog. ## Dialog layout The dialog contains: - **Source tunnel** dropdown -- select the tunnel alignment to copy from. - **Target tunnel** dropdown -- select the tunnel alignment to copy to. - **Templates checklist** -- lists all templates in the source tunnel with checkboxes. All templates are checked by default. - **Copy Line Definitions** checkbox -- when checked, Template Line Definitions are also copied. - **Copy Station Definitions** checkbox -- when checked, Station Definitions are also copied. - **Copy** button -- executes the copy operation. - **Close** button -- closes the dialog. ## What gets copied The copy operation transfers the following items from the source tunnel to the target tunnel: ### Template Line Definitions When "Copy Line Definitions" is checked, all Template Line Definitions from the source are copied to the target. Each definition's name, layer, color, and draw flag are preserved. ### Templates Each checked template in the list is copied with its full geometry: - Template name and description - All template lines within the template - Point coordinates for each template line - Bulge values for arc segments - Closed/open status of each polyline ### Station Definitions When "Copy Station Definitions" is checked, the chainage-range-to-template mappings are copied. This includes the station from/to values, the assigned template name, and any transform settings (transform-to template, length, and type). ## Duplicate handling The copy operation skips items that already exist in the target tunnel: - **Template Line Definitions** are matched by name. If a definition with the same name already exists in the target, it is not overwritten. - **Templates** are matched by name. If a template with the same name exists, its existing lines may be updated with geometry from the source, but the template itself is not duplicated. - **Station Definitions** are matched by template name and chainage range. If an identical station definition already exists (same template name, same Station From, same Station To), it is skipped. This makes the operation safe to run multiple times -- it will not create duplicates or overwrite existing data. ```{note} The source and target must be different tunnels. The dialog will show an error if you attempt to copy a tunnel to itself. ``` ## Completion summary After the copy completes, a summary dialog shows how many items were copied: - Number of templates copied - Number of line definitions copied - Number of station definitions copied If all selected items already exist in the target, the dialog reports "Nothing Copied" with an explanation. ## Typical use case Consider a project with a left tube and a right tube that share the same design profile: 1. Define templates and station definitions in the first tunnel (e.g., "Left Tube"). 2. Open **Template > Copy**. 3. Set Source to "Left Tube" and Target to "Right Tube". 4. Ensure all checkboxes are checked. 5. Click **Copy**. 6. Both tunnels now have identical template definitions. Adjust the station definitions in the target tunnel if the chainage ranges differ. ```{tip} After copying, you can modify the copied templates in the target tunnel independently. Changes to one tunnel's templates do not affect the other. ```