Пример #1
0
 /// <summary>
 /// Retrieves the text from the notes of the supplied node graph
 /// </summary>
 /// <param name="nodeGraph">Dynamo.Graph.NodeGraph</param>
 /// <returns name="notes">Dynamo.Graph.Notes.NoteModel</returns>
 /// <search>
 /// dynamo, api, current, node, graph, notes, text, string
 /// </search>
 public static IEnumerable <Dynamo.Graph.Notes.NoteModel> Notes(Dynamo.Graph.NodeGraph nodeGraph)
 {
     //List<Dynamo.Graph.Notes.NoteModel> notes = new List<Dynamo.Graph.Notes.NoteModel>(nodeGraph.Notes);
     //
     //List<string> output = new List<string>();
     //foreach (var n in notes)
     //{
     //    output.Add(n.Text.ToString());
     //}
     return(nodeGraph.Notes);
 }
Пример #2
0
        /// <summary>
        /// Retrieves the current amount of connectors from the node graph
        /// </summary>
        /// <param name="nodeGraph">Dynamo.Graph.NodeGraph</param>
        /// <returns name="amount">int</returns>
        /// <search>
        /// dynamo, api, current, node, graph, wires, connectors, count
        /// </search>
        public static int Connectors(Dynamo.Graph.NodeGraph nodeGraph)
        {
            List <Dynamo.Graph.Connectors.ConnectorModel> con = new List <Dynamo.Graph.Connectors.ConnectorModel>(nodeGraph.Connectors);

            return(con.Count);
        }
Пример #3
0
 /// <summary>
 /// Retrieves the nodes from the Node Graph
 /// </summary>
 /// <param name="nodeGraph">Dynamo.Graph.NodeGraphl</param>
 /// <returns name="nodes">Dynamo.Graph.Nodes.NodeModel</returns>
 /// <search>
 /// dynamo, api, node, graph, nodes, model
 /// </search>
 public static IEnumerable <Dynamo.Graph.Nodes.NodeModel> Nodes(Dynamo.Graph.NodeGraph nodeGraph)
 {
     return(nodeGraph.Nodes);
 }
Пример #4
0
 /// <summary>
 /// Retrieves the groups/annotations from the Node Graph
 /// </summary>
 /// <param name="nodeGraph">Dynamo.Graph.NodeGraph</param>
 /// <returns name="groups">Dynamo.Graph.Annotations.AnnotationModel</returns>
 /// <search>
 /// dynamo, api, node, graph, annotation, model, groups
 /// </search>
 public static List <Dynamo.Graph.Annotations.AnnotationModel> Groups(Dynamo.Graph.NodeGraph nodeGraph)
 {
     return(nodeGraph.Annotations);
 }