public static void Example_Selection()
        {
            var activeDoc = CatiaApplication.Instance.ActiveDocument;

            Debug.WriteLine(activeDoc.GetName());

            var selection = activeDoc.Selection;

            _ = CatiaApplication.Instance.Documents;


            selection.DebugSelection();

            Tree.ApplyWorkMode();

            var tree = new NodeTree(selection.GetDocuments().FirstOrDefault());

            tree.DebugTree();

            Debug.WriteLine("----------------------------------");

            var sel = SelectionExt.SelectUnderSelection();

            foreach (var doc in sel.GetDocuments())
            {
                Debug.WriteLine(doc.GetName());
            }

            Console.Write("Press any key to continue . . . ");
            Console.ReadKey(true);
        }
Exemple #2
0
        public Selection SelectUnderNode()
        {
            if (!SelectNode())
            {
                throw new NotFoundException();
            }

            return(SelectionExt.SelectUnderSelection());
        }