Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ The interface has the properties below that a custom tree can define and modify.

The *Custom tree* definition is flexible in terms of its hierarchy and how objects are represented with respect to each other. The drag and drop feature also enables changing the hierarchy during the session. As noted in the previous section, the specification of a *TreeParent* for a custom objects overrides the group definition.

![](../../../../images/custom_tree_1.png "Custom objects are organized in linear form.")
![](../../../../images/custom_tree_1.png)

![](../../../../images/custom_tree_2.png "Object 1 is nested into object 3.")
![](../../../../images/custom_tree_2.png)

By using the *StageIdentifer* property add-ins can control the visibility of the custom tree based upon the current stage. The *Custom Tree*will only show in the stages specified in the *StageIdentifers* list and won’t be displayed in the other stages. In the figures below, the tree is shown in the *CustomStage* that the add-in defined, but it is not shown in the *Refine* stage.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ The Sample Add-in project \(C\#\) contains programming examples of how to use va

| Sample Project | Version | Language | Link |
|----------------|---------|----------|------|
| **Discovery Basic Template #1: Command Example**<br><br>Demonstrates how to create an add-in and use a command to create a sample block. | API V241 | C# | [Visit the Ansys Discovery Space](https://innovationspace.ansys.com/ais-discovery/) |
| **Discovery Basic Template #2: Tool Example**<br><br>Demonstrates how to define a button that activates a tool on the HUD. The tool has a text box for double values and a second toolbox for an example physical quantity temperature. A check box allows you to switch between the two text boxes, chaining their visibility and keeping values in sync between the two fields. | API V241 | C# | [Visit the Ansys Discovery Space](https://innovationspace.ansys.com/ais-discovery/) |
| **Discovery Basic Template Installer #3: Custom Object/Custom Tree Example**<br><br>Includes the functionality from the Discovery Basic Template #2: Tool Example and adds functionality to create a custom object that is displayed in the custom tree. The example shows how to link the custom object with the tool properties displayed in the HUD. | API V241 | C# | [Visit the Ansys Discovery Space](https://innovationspace.ansys.com/ais-discovery/) |
| **Sample Add-in**<br><br>**Copy Component** - Show how to create a new translated component instance.<br><br>**Create Assembly** - Shows how to create a simple assembly with two positioned instances of one part, and one instance of another part.<br><br>**Create Block** - Shows how to create a block by extruding a rectangular profile.<br><br>**Create Gear** - Shows how to create a simple gear by extruding a complex profile involving lines and arcs.<br><br>**Create Hole** - Shows how to create a hole by subtracting a cylinder.<br><br>**Create Notes** - Shows how to create an annotation plane and then create notes at various angles, with different fonts and colors.<br><br>**Create Torus** - Shows how to create a torus by sweeping a circular profile around a larger circle.<br><br>**Export** - Shows how to export a document in various file formats.<br><br>**Find Matching Faces** - Shows how to traverse bodies and faces in an assembly and compare their geometry.<br><br>**Scene Graph** - Creates a scene graph.<br><br>**Select Loop** - Shows how to access the topology of a body and traverse edges, loops and fins.<br><br>**Sketch Tool** - Shows how to create an interaction tool for sketching lines.<br><br>**Spin Component** - Demonstrates animation by rotating selected component.<br><br>**Profile Tool** - Shows how to create and modify a custom object using an interaction tool. | API V241 | C# | [Visit the Ansys Discovery Space](https://innovationspace.ansys.com/ais-discovery/) |
| **Discovery Basic Template #1: Command Example**<br><br>Demonstrates how to create an add-in and use a command to create a sample block. | API V242 | C# | [Visit the Ansys Discovery Space](https://innovationspace.ansys.com/ais-discovery/) |
| **Discovery Basic Template #2: Tool Example**<br><br>Demonstrates how to define a button that activates a tool on the HUD. The tool has a text box for double values and a second toolbox for an example physical quantity temperature. A check box allows you to switch between the two text boxes, chaining their visibility and keeping values in sync between the two fields. | API V242 | C# | [Visit the Ansys Discovery Space](https://innovationspace.ansys.com/ais-discovery/) |
| **Discovery Basic Template Installer #3: Custom Object/Custom Tree Example**<br><br>Includes the functionality from the Discovery Basic Template #2: Tool Example and adds functionality to create a custom object that is displayed in the custom tree. The example shows how to link the custom object with the tool properties displayed in the HUD. | API V242 | C# | [Visit the Ansys Discovery Space](https://innovationspace.ansys.com/ais-discovery/) |
| **Sample Add-in**<br><br>**Copy Component** - Show how to create a new translated component instance.<br><br>**Create Assembly** - Shows how to create a simple assembly with two positioned instances of one part, and one instance of another part.<br><br>**Create Block** - Shows how to create a block by extruding a rectangular profile.<br><br>**Create Gear** - Shows how to create a simple gear by extruding a complex profile involving lines and arcs.<br><br>**Create Hole** - Shows how to create a hole by subtracting a cylinder.<br><br>**Create Notes** - Shows how to create an annotation plane and then create notes at various angles, with different fonts and colors.<br><br>**Create Torus** - Shows how to create a torus by sweeping a circular profile around a larger circle.<br><br>**Export** - Shows how to export a document in various file formats.<br><br>**Find Matching Faces** - Shows how to traverse bodies and faces in an assembly and compare their geometry.<br><br>**Scene Graph** - Creates a scene graph.<br><br>**Select Loop** - Shows how to access the topology of a body and traverse edges, loops and fins.<br><br>**Sketch Tool** - Shows how to create an interaction tool for sketching lines.<br><br>**Spin Component** - Demonstrates animation by rotating selected component.<br><br>**Profile Tool** - Shows how to create and modify a custom object using an interaction tool. | API V242 | C# | [Visit the Ansys Discovery Space](https://innovationspace.ansys.com/ais-discovery/) |

## Building the sample add-in project

Expand Down