# Insert Sibling node

**URL:** https://forum.universal-robots.com/t/insert-sibling-node/3286
**Category:** Product Wishlist
**Created:** [December 11, 2018, 4:21pm UTC](https://forum.universal-robots.com/t/insert-sibling-node/3286 "2018-12-11T16:21:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sam.verity-hilton](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/sam.verity-hilton/32/6046_2.png) [@sam.verity-hilton](https://forum.universal-robots.com/u/sam.verity-hilton)
#### Post date: [December 11, 2018, 4:21pm UTC](https://forum.universal-robots.com/t/insert-sibling-node/3286/1 "2018-12-11T16:21:12Z")

</div>

It would be really handy to be able to add not just children nodes but also sibling nodes from within a URCap. Similar to the methods `insetChildBefore()` / `insertChildAfter()`

 ![Screenshot%20from%202018-12-11%2016-13-43](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/3/3c071f93b67a5e37a94ce13dd1c4deb71afab5fa.png)

Such that it would be possible to code the buttons `Add Waypoint Before` and `Add Waypoint After` to add new sibling waypoint nodes to the tree, as you can from the structure tab.

See:

> [@How to implement insertChildAfter or insertChildBefore](https://forum.universal-robots.com/t/how-to-implement-insertchildafter-or-insertchildbefore/3124):
>
> I like to add a treenode just below the current URCAP program node. At the same tree level. Not as a child below. Syntax: To execute the java API function insertChildAfter, the current treenode (to use as 'add just after this treenode) is required 'but also the parent of the current tree node (to use a the parent/root to add a child to). The current treenode is available via TreeNode root = programModel.getRootTreeNode(this); But how can I get the parent tree node ? Any example availabl…
