Skip to Content
0
Aug 25, 2016 at 08:24 PM

Visual Enterprise 8.0 slowness

48 Views

A major issue we’re having with the 8.0 version is slowness in selecting a node and it’s children. If this slowness is resolved, it may remedy the freezing and crashing issue we've been experiencing.

Here’s a sample of the code that selects the nodes children.

void axDeepView_NodesSelectedEvent(object sender, AxExploration3D.IDeepViewEvents_NodesSelectedEvent e)
{
//List selected nodes on label.
SceneObjectList nodes = axDeepView1.Scene.Nodes;

//Store the node count
int nodeCount = axDeepView1.Scene.Nodes.Count;

//Some safety checks to make sure we are in the correct mode... 13 is the index we use to "part" selection as opposed to assembly
if (e.currentlySelectedNodes.Count == 0 || nodeCount == 0 || Assembly_Button.ImageIndex == 13)
return;

//Loop through all our nodes
for (int iNumNodes = 0; iNumNodes < e.currentlySelectedNodes.Count; ++iNumNodes)
{
//Grab the current node and store it
Node selNode = e.currentlySelectedNodes.GetByIndex(iNumNodes);

// Get the ultimate parent for the node
for (selNode = selNode.Parent; selNode.Parent != null && selNode.Parent.Parent != null && selNode.Name != ""; )
{
//Store the highest valid parent
selNode = selNode.Parent;
}

axDeepView1.NodesSelectedEvent -= axDeepView_NodesSelectedEvent;

SelectChildren(selNode.FirstChild);

axDeepView1.NodesSelectedEvent += new AxExploration3D.IDeepViewEvents_NodesSelectedEventHandler(axDeepView_NodesSelectedEvent);
}
}

void SelectChildren(Node node)
{
if (node != null)
{
for (Node sibNode = node; sibNode != null; sibNode = sibNode.NextSibling)
{
if (!sibNode.Selected)
{
try
{
sibNode.Selected = true;
}
catch (Exception ex)
{
System.Diagnostics.Debug.Print("Error:" + ex.Message);
}
}
SelectChildren(sibNode.FirstChild);
}
}
}