Example #1
0
        private string RequestNodeDocs(Dynamo.Graph.Nodes.NodeModel node)
        {
            var docBrowserviewExtension = this.View.viewExtensionManager.ViewExtensions.OfType <DocumentationBrowserViewExtension>().FirstOrDefault();
            var nodeAnnotationEventArgs = new OpenNodeAnnotationEventArgs(node, this.ViewModel);

            docBrowserviewExtension.HandleRequestOpenDocumentationLink(nodeAnnotationEventArgs);
            return(GetSidebarDocsBrowserContents());
        }
Example #2
0
        /// <summary>
        /// Retrieves the position of the node
        /// </summary>
        /// <param name="node">Dynamo.Graph.Nodes.NodeModel</param>
        /// <returns name="position">string</returns>
        /// <search>
        /// dynamo, api, node, model, position, x, y
        /// </search>
        public static string Position(Dynamo.Graph.Nodes.NodeModel node)
        {
            double x = node.CenterX;
            double y = node.CenterY;

            string pos = "x = " + x.ToString() + ", y = " + y.ToString();

            return(pos);
        }
Example #3
0
 private void CurrentWorkspaceModel_NodeAdded(Dynamo.Graph.Nodes.NodeModel obj)
 {
     Actions.Add($"Node {obj.Name} created");
 }
Example #4
0
 /// <summary>
 /// Retrieves the Tags of the node
 /// </summary>
 /// <param name="node">Dynamo.Graph.Nodes.NodeModel</param>
 /// <returns name="tags">string</returns>
 /// <search>
 /// dynamo, api, node, model, tags
 /// </search>
 public static List <string> Tags(Dynamo.Graph.Nodes.NodeModel node)
 {
     return(node.Tags);
 }
Example #5
0
        /// <summary>
        /// Tells you current state of the node. Will return either Active, AstBuildBroken, Dead, Error, PersistentWarning or Warning
        /// </summary>
        /// <param name="node">Dynamo.Graph.Nodes.NodeModel</param>
        /// <returns name="state">string</returns>
        /// <search>
        /// dynamo, api, node, element, state, error, warning, active, AstBuildBroken, Dead, Error, PersistentWarning
        /// </search>
        public static string State(Dynamo.Graph.Nodes.NodeModel node)
        {
            string eS = node.State.ToString();

            return(eS);
        }
Example #6
0
 /// <summary>
 /// Retrieves the nickname of the node
 /// </summary>
 /// <param name="node">Dynamo.Graph.Nodes.NodeModel</param>
 /// <returns name="nickname">string</returns>
 /// <search>
 /// dynamo, api, node, nickname, name, string
 /// </search>
 public static string Nickname(Dynamo.Graph.Nodes.NodeModel node)
 {
     return(node.NickName);
 }
Example #7
0
 /// <summary>
 /// Tells you if the node has an error
 /// </summary>
 /// <param name="node">Dynamo.Graph.Nodes.NodeModel</param>
 /// <returns name="bool">bool</returns>
 /// <search>
 /// dynamo, api, node, element, state, error, is, in, bool, yes, no, true, false
 /// </search>
 public static bool IsInErrorState(Dynamo.Graph.Nodes.NodeModel node)
 {
     return(node.IsInErrorState);
 }
Example #8
0
 /// <summary>
 /// Tells you if the node is frozen
 /// </summary>
 /// <param name="node">Dynamo.Graph.Nodes.NodeModel</param>
 /// <returns name="bool">bool</returns>
 /// <search>
 /// dynamo, api, node, model, is, frozen, bool, yes, no, true, false
 /// </search>
 public static bool IsFrozen(Dynamo.Graph.Nodes.NodeModel node)
 {
     return(node.IsFrozen);
 }
Example #9
0
 /// <summary>
 /// Retrieves the Guid of the node
 /// </summary>
 /// <param name="node">Dynamo.Graph.Nodes.NodeModel</param>
 /// <returns name="guid">Guid</returns>
 /// <search>
 /// dynamo, api, node, model, guid
 /// </search>
 public static Guid GUID(Dynamo.Graph.Nodes.NodeModel node)
 {
     return(node.GUID);
 }
Example #10
0
 /// <summary>
 /// Retrieves the description of the node
 /// </summary>
 /// <param name="node">Dynamo.Graph.Nodes.NodeModel</param>
 /// <returns name="desc">string</returns>
 /// <search>
 /// dynamo, api, node, model, description, string
 /// </search>
 public static string Description(Dynamo.Graph.Nodes.NodeModel node)
 {
     return(node.Description);
 }
Example #11
0
 /// <summary>
 /// Retrieves the type of the node
 /// </summary>
 /// <param name="node">Dynamo.Graph.Nodes.NodeModel</param>
 /// <returns name="name">string</returns>
 /// <search>
 /// dynamo, api, node, model, name, string, creation
 /// </search>
 public static string CreationName(Dynamo.Graph.Nodes.NodeModel node)
 {
     return(node.CreationName);
 }
Example #12
0
 /// <summary>
 /// Retrieves the current amount of nodes from the workspace
 /// </summary>
 /// <param name="node">Dynamo.Graph.Nodes.NodeModel</param>
 /// <returns name="category">string</returns>
 /// <search>
 /// dynamo, api, node, model, name, string
 /// </search>
 public static string Category(Dynamo.Graph.Nodes.NodeModel node)
 {
     return(node.Category);
 }