# Install — Capital ⇄ Teamcenter plugin

**Prerequisite:** Siemens **Capital Systems Architect 2512** installed. Below,
`<CapitalHome>` is your Capital installation root (the folder that contains
`plugins\`, `lib\`, and `doc\` — e.g. `C:\Siemens\Capital` or wherever your seat
lives).

## 1. Copy the files

Copy these two items from this package into `<CapitalHome>\plugins\`:

```
plugins\XceleratorTcImport\        →  <CapitalHome>\plugins\XceleratorTcImport\
plugins\CustomMenuConfiguration.xml →  <CapitalHome>\plugins\CustomMenuConfiguration.xml
```

After copying, you should have:

```
<CapitalHome>\plugins\
├── CustomMenuConfiguration.xml
└── XceleratorTcImport\
    ├── capital-tc-import.jar
    ├── bundle.json
    ├── tc-connection.properties
    ├── extras\  (jackson-annotations.jar, jackson-core.jar, jackson-databind.jar)
    └── tc-outbox\
```

### If you already have a `CustomMenuConfiguration.xml`

Don't overwrite it — **merge**. Open your existing
`<CapitalHome>\plugins\CustomMenuConfiguration.xml` and add these three `<item>`
lines inside its `<menu>` element:

```xml
<item name="Import from Teamcenter..." action="plugin:Java//com.xcelerator.capital.tcimport.plugin.TcImportAction"/>
<item name="Teamcenter Browser"        action="plugin:Java//com.xcelerator.capital.tcimport.plugin.TcBrowserPanel"/>
<item name="Publish to Teamcenter..."  action="plugin:Java//com.xcelerator.capital.tcimport.plugin.TcPublishAction"/>
```

## 2. Load the plugin

- **Capital not running:** just start Capital Systems Architect.
- **Capital already running:** **System ▸ Plugin ▸ Reload All** — no restart needed.

## 3. Verify it loaded

1. Open (or create) a **platform design**.
2. Press the **Space Bar** and type **Custom** — you should see
   **Import from Teamcenter…** and **Publish to Teamcenter…** (also available in
   the right-click menus on a platform design).
3. Open the **Design Inspector** and look for the **Teamcenter Browser** tab.

If the actions don't appear, confirm the `extras\jackson-*.jar` files are present
(the plugin needs them at runtime) and that `CustomMenuConfiguration.xml` is
directly under `<CapitalHome>\plugins\`.

You're ready — go to [DEMO-SCRIPT.md](DEMO-SCRIPT.md).

---

## Configuration (defaults are demo-ready)

`plugins\XceleratorTcImport\tc-connection.properties` ships in **file mode**:
Import and the Teamcenter Browser read the bundled `bundle.json`, and Publish
writes to `tc-outbox\`. Nothing else is required.

Full annotated reference: `docs\tc-connection.sample.properties`.

## Optional: live round-trip against a Teamcenter-side service

To demo against a running Teamcenter-side service instead of the bundled sample,
edit `tc-connection.properties`:

```properties
tc.source=rest
tc.baseUrl=http://<service-host>:8080     # the tc-service URL you were given
publish.postEnabled=true                  # Publish also POSTs the bundle
```

Then **System ▸ Plugin ▸ Reload All**. The Teamcenter Browser's Refresh will read
live from the service (it falls back to the bundled sample if the service is
unreachable). The `tc-service` build and a service URL aren't in this package —
ask Chris.

## Uninstall

Delete `<CapitalHome>\plugins\XceleratorTcImport\`, remove the three `<item>`
lines from `CustomMenuConfiguration.xml` (or delete the file if it only holds
those), and **Reload All**.
