Let’s put some data into the Nexus database interactively from EnSight. Launch the EnSight application as you would normally do (Note: this requires EnSight version 10.2.7(a) or newer). In the top EnSight menu, choose Window>Welcome to…
In the resulting dialog that pops up, select Cylinder Flow and click on the Open button.
EnSight will load the included Cylinder dataset and will restore the associated session as shown below.
Note that we already have a Nexus server running outside of EnSight. Now we want to push into the attached database an image for the current viewport. Right-click anywhere on the background of the viewport -> Send image to -> Report:
This will pop up a message informing you that EnSight isn't currently connected to any database:
Toggle on the Advanced options, and select the "Connect to a report server that is already running" option. A new widget will pop up asking for the URL, username and password to connect to it. Click on the Select local server, set the port number to 8000 (same as we set in the previous section). Username and password will be filled automatically with the default "nexus" and "cei":
Now you are connected to the Nexus server! A new message will pop-up asking for the resolution of the image you want to push into the database. Just set the Width and Height as you want and click Ok:
Well done! You have pushed your first item into Nexus. This image will automatically be linked to the dataset gmv_cylinder.case, with a tag "interactive".
Next, lets' capture another image. However, this time, let's add some tags: “analysis=mass_flow color_variable=velocity”. When declaring multiple tags, they must be separated with a space. Here we've defined two tags, "analysis" and "variable", both of which have a value. Go into the States tab at the bottom-left:
Double-click on the Report tags section, and manually add the tags:
Now, right-click again on the background of the viewport -> Send image to -> Report. Another image is now pushed to Nexus, but this image has tags.
Now select the three parts whose ids are 3,4,& 5. Right click on one of the selected parts, go to Color by>Select variable, and select the vector variable Velocity.
Right-click anywhere on the viewport background -> Send to report -> 3D scene:
A dialog will pop up asking if you want to record all timesteps. Leave the toggle OFF and click Ok. This will push your 2D and 3D parts at the current timestep into the Nexus database as geometry. Note also that the tags you entered for the previous image push remain here as well. These tags will facilitate searching for these items later and become much more useful when you push data from multiple sessions working on multiple analyses into Nexus.
Let's go back into our web browser and look at our Nexus database to see our three Report Items that we just pushed. In the Query section, set the search to be by Dataset filename which contains any of ‘gmv’, then run the query.
Since the push to Nexus that we did in EnSight automatically recorded the Dataset filename, the result of the search on Dataset filename contains the three Report Items that we have just added, plus a Logo image file.
Note how each Item has as tags stateset=....., with a unique GUID that identifies the session of EnSight this items where created from. Notice also how the two Image source items contain the same image, but the first one has only the default GUID tag plus an "interactive" tag, while the second has the tags we set in EnSight.
This data has been saved into your local database. If you quit the Nexus server and restart it, you will find these Report Items in it.
We now want to delete the data Item without tags from the database. In order to delete data from your dataset, you will need to log in. If you are not logged in, you can search and see data Items, but cannot modify them (add or delete). Click on the Log in button in the top right of your web browser, log in with user name ‘nexus’ and use the password ‘cei’.
Now, select the “Query” menu. You can see two new options now that you are logged in. Click “Select report items to delete”
Choose Dataset filename contains any of ‘gmv’, and (to make it unique) choose an item tag that does not contain "analysis". Click Run Query.
Now you have a match of only the untagged Report Item as shown below. Note that also the default Logo image item is queried. We can delete this as well since we don't particularly care for a Logo in our database and report. Click on the “Delete selected items” button to permanently remove this report Item from the local database.
Now let's look at the remaining two report items. Go again into Query>Report Items:
And redo a query of Dataset filename contains ‘gmv’ as shown below:
And see the result of the query below.
Click on the image Report Item to see the image displayed.
Now click on the dataset ID of this Report Item to open up details about the Dataset. You can see that EnSight automatically populated the dataset filename, the format of the data, the location of the data, total number of parts, and the number of elements.
Click on the web browser back arrow a couple of times to get back to the results of the Search for Report Items in dataset with filename containing ‘gmv’, and click on the Scene geometry source object (the second item in the list below).
Now you see the 3D report Item. This is not an image. It is the 3D geometry from EnSight and is displayed in Nexus using an interactive web-based renderer. Click and drag your pointer in the graphics window and move the geometry around. This is a highly useful interactive item that can be quite informative when included in a report page (which we will see later).