ModelManagerGetModelStructure Method |
Namespace: VIZCore3D.NET.Manager
public static StructureManager GetModelStructure( string path, bool includeBody = false )
// VIZCore3D.NET Control private VIZCore3D.NET.VIZCore3DControl vizcore3d; private void StructureFromFile() { string path = "C:\\Model\\BLOCK.viz"; VIZCore3D.NET.ShdCore.StructureManager stru = VIZCore3D.NET.Manager.ModelManager.GetModelStructure(path); List<VIZCore3D.NET.ShdCore.ModelTreeNode> roots = stru.Roots; // Structure foreach (VIZCore3D.NET.ShdCore.ModelTreeNode root in roots) { string name = root.NodeName; if(root.Nodes.Count != 0) { NavigateNodes(root); } } // Node List foreach (VIZCore3D.NET.ShdCore.ModelTreeNode item in stru.GetStructureNodeList()) { // Some code here... } } private void NavigateNodes(VIZCore3D.NET.ShdCore.ModelTreeNode parent) { foreach (VIZCore3D.NET.ShdCore.ModelTreeNode item in parent.Nodes) { string name = item.NodeName; if(item.Nodes.Count != 0) { NavigateNodes(item); } } }