Skip to content

Latest commit

 

History

History
99 lines (61 loc) · 4.49 KB

File metadata and controls

99 lines (61 loc) · 4.49 KB

Excel Connection [omni.sample.excel_connection]

Excel Connected

This is a sample extension that connects NVIDIA Omniverse to Microsoft Excel in Microsoft Windows. The full source code along with assets can be found here.

This extension sample includes a step-by-step tutorial to demonstrate how it was written. Learn how with the tutorial.

Usage

In order to use this sample you must install Microsoft Excel, install Omniverse, clone this repository, and add configure Omniverse to include the provided extension. Then the extension can be used as described below.

Install Microsoft Excel

If you do not have Excel installed, it can be purchased and downloaded here.

Install Omniverse Launcher and an Omniverse App

  1. Install Omniverse Launcher: download
  2. Install and launch an Omniverse app through the launcher such as Omniverse Code.

Adding This Extension to your Omniverse App

Directly from Github

To add a this extension to your Omniverse app directly from github:

  1. Go into: Extension Manager → Hamburger Menu → Settings → Extension Search Paths
extension search path
  1. Add this as a search path: git://github.com/NVIDIA-Omniverse/kit-extension-sample-spawn-prims.git?branch=main&dir=exts

With Source

Adding the Source to Omniverse

  1. Fork and clone this repo, for example in C:\projects\kit-extension-sample-excel-connection
  2. In the Omniverse App open extension manager: WindowExtensions.
  3. In the Extension Manager Window click on the hamburger menusettings.
  4. In the settings page there is a list of Extension Search Paths. Click on the plus button and add the cloned repo's exts subfolder. If you used the example clone path, the exts filder would be here: C:\projects\kit-extension-sample-excel-connection\exts
extension search path
  1. Now you can find omni.sample.excel_connection extension in the top left search bar. Select and enable it.
  2. The "Excel Connection" window will pop up. Extension Manager watches for any file changes. You can try changing some code in this extension and see them applied immediately with a hotreload.

Linking with an Omniverse app

For a better developer experience, it is recommended to create a folder link named app to the Omniverse Kit app installed from Omniverse Launcher. A convenience script to use is included.

Run:

> link_app.bat

If successful you should see app folder link in the root of this repo.

If multiple Omniverse apps is installed script will select recommended one. Or you can explicitly pass an app:

> link_app.bat --app code

You can also just pass a path to create link to:

> link_app.bat --path "C:/Users/bob/AppData/Local/ov/pkg/create-2022.1.3"

Open the Scene

Use the Omniverse app installed previously to open Warehouse_Scene.usd included in the Assets folder of the repository.

Enter the Spreadsheet Path

Copy the path of Warehouse_BOM.xlsx included in the Assets folder of the repository and paste it into the Spreadsheet Path field of the Excel Connection extension as shown in the image below:

Excel connection window

Connect Omniverse to Microsoft Excel

Finally, click the Connect button in the Excel Connection Window. You can now move a pallet in Omniverse and see its position values change in Excel or you can change position values in Excel and see pallets move in Omniverse.

Excel connected

Note: Sometimes Excel instances do not close completely and this causes unexpected behavior; This can happen if the extension is reloaded without clicking on the disconnect button. If the connection is not working well, open the windows task manager and manually close all open Excel applications.