NTreeLayout issue after upgrading Vision .NET 2006 to 2017

Print Topic | Close Window

By JC Mata - 2 Years Ago
Hi all,

I'm trying to create an instance of NTreeLayout as follows

Dim treeLayout As New NTreeLayout(document)

but I'm getting this error

'New' cannot be used on a class that is declared 'MustInherit'

now then, looking at the user guide, it should be possible to create an instance that way...
What I'm doing wrong?

User Guide - Tree Layout

Thank you all for your responses.
By Nevron Support - 2 Years Ago
You cannot instantiate an abstract class - you can create an instance of one of the classes that inherit from NTreeLayout - for example NBalloonTreeLayout, NLayeredTreeLayout, NCompactDepthTreeLayout, NTipOverTreeLayout etc. The following example shows the different types of layouts:
VB.NET Examples \ Layouts
take a look at Compact Depth Tree Layout, Layered Tree Layout and Tip Over Tree layout. 
Let us know if you meet any problems or have any questions.
By JC Mata - 2 Years Ago
Thank you for your answer, you may want to update the documentation then...

User Guide - NTreeLayout

The tree layout is used to automatically arrange graphs, which represent tree structures. The tree layout algorithms are encapsulated inside the NTreeLayout class (derived from NLayout), which can be instanced on demand:

' create a new tree layout associated with the specified document 
Dim treeLayout As New NTreeLayout(document)

By Nevron Support - 2 Years Ago

This topic is not part of the official Nevron .NET Vision documentation. Here's a link to a topic about a specific tree layout:

Layered Tree Layout

As you can see on the navigation on the left, there isn't a link to this old topic, you are referencing. Only the file of this topic has left. Most probably we forgot to delete it from the server. Thank you very much for reporting that. We will delete it from the server soon, so that there isn't any confusion.