public static NodeMigrationData Migrate_0750(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); var oldNode = data.MigratedNodes.ElementAt(0); var newNode = MigrationManager.CloneAndChangeName(oldNode, "UnitsUI.LengthFromString", "Number From Feet and Inches", true); migrationData.AppendNode(newNode); return(migrationData); }
public static NodeMigrationData Migrate_0750(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); XmlElement oldNode = data.MigratedNodes.ElementAt(0); XmlElement newNode = MigrationManager.CloneAndChangeName(oldNode, "DSCoreNodesUI.Input.IntegerSlider", "Integer Slider", true); migrationData.AppendNode(newNode); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); migrationData.AppendNode(MigrationManager.CloneAndChangeName( data.MigratedNodes.ElementAt(0), "CoreNodeModels.ColorRange", "Color Range")); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { NodeMigrationData migrationData = new NodeMigrationData(data.Document); migrationData.AppendNode(MigrationManager.CloneAndChangeName( data.MigratedNodes.ElementAt(0), "DSRevitNodesUI.WallTypes", "Wall Types")); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); migrationData.AppendNode(MigrationManager.CloneAndChangeName( data.MigratedNodes.ElementAt(0), "Analyze.Render.RenderQualityDropDown", "RenderQuality")); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { NodeMigrationData migrationData = new NodeMigrationData(data.Document); migrationData.AppendNode(MigrationManager.CloneAndChangeName( data.MigratedNodes.ElementAt(0), "Dynamo.Nodes.WatchImageCore", "Watch Image")); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { NodeMigrationData migrationData = new NodeMigrationData(data.Document); migrationData.AppendNode(MigrationManager.CloneAndChangeName( data.MigratedNodes.ElementAt(0), "Dynamo.Nodes.DSAnalysisResultSelection", "Select Analysis Results")); return(migrationData); }
public static NodeMigrationData Migrate_0830_to_0900(NodeMigrationData data) { System.Xml.XmlElement xmlNode = data.MigratedNodes.ElementAt(0); var element = MigrationManager.CloneAndChangeName(xmlNode, "PythonNodeModels.PythonStringNode", "Python Script From String"); var migrationData = new NodeMigrationData(data.Document); migrationData.AppendNode(element); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); migrationData.AppendNode( MigrationManager.CloneAndChangeName( data.MigratedNodes.ElementAt(0), "DSRevitNodesUI.SpacingRuleLayouts", "Spacing Rule Layout")); return(migrationData); }
public static NodeMigrationData Migrate_0820_to_0830(NodeMigrationData data) { NodeMigrationData migrationData = new NodeMigrationData(data.Document); XmlElement oldNode = data.MigratedNodes.ElementAt(0); XmlElement newNode = MigrationManager.CloneAndChangeName( oldNode, "CoreNodeModels.Sequence", "Sequence"); migrationData.AppendNode(newNode); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { System.Xml.XmlElement xmlNode = data.MigratedNodes.ElementAt(0); var element = MigrationManager.CloneAndChangeName(xmlNode, "DSIronPythonNode.PythonStringNode", "Python Script From String"); element.SetAttribute("inputcount", "2"); NodeMigrationData migrationData = new NodeMigrationData(data.Document); migrationData.AppendNode(element); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); XmlElement oldNode = data.MigratedNodes.ElementAt(0); XmlElement newNode = MigrationManager.CloneAndChangeName( oldNode, "DSRevitNodesUI.FamilyInstanceParameters", "Get Family Parameter"); migrationData.AppendNode(newNode); foreach (XmlElement subNode in oldNode.ChildNodes) { newNode.AppendChild(subNode.Clone()); } return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); XmlElement oldNode = data.MigratedNodes.ElementAt(0); XmlElement newNode = MigrationManager.CloneAndChangeName(oldNode, "CoreNodeModels.Formula", "Formula"); XmlElement newChild = data.Document.CreateElement("FormulaText"); if (oldNode.FirstChild != null) { newChild.InnerText = oldNode.FirstChild.InnerText; } newNode.AppendChild(newChild); migrationData.AppendNode(newNode); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); var oldNode = data.MigratedNodes.ElementAt(0); var newNode = MigrationManager.CloneAndChangeName( oldNode, "UnitsUI.VolumeFromString", "Volume From String"); migrationData.AppendNode(newNode); foreach (XmlElement subNode in oldNode.ChildNodes) { newNode.AppendChild(subNode); } return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); XmlElement oldNode = data.MigratedNodes.ElementAt(0); XmlElement newNode = MigrationManager.CloneAndChangeName( oldNode, "DSCoreNodesUI.WebRequest", "Web Request"); migrationData.AppendNode(newNode); foreach (XmlElement subNode in oldNode.ChildNodes) { newNode.AppendChild(subNode); } return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { NodeMigrationData migrationData = new NodeMigrationData(data.Document); XmlElement oldNode = data.MigratedNodes.ElementAt(0); XmlElement newNode = MigrationManager.CloneAndChangeName( oldNode, "Analyze.Render.ExportDocumentRenderData", "Export Cloud Render Data"); migrationData.AppendNode(newNode); foreach (XmlElement subNode in oldNode.ChildNodes) { newNode.AppendChild(subNode.Clone()); } return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { NodeMigrationData migrationData = new NodeMigrationData(data.Document); XmlElement oldNode = data.MigratedNodes.ElementAt(0); XmlElement newNode = MigrationManager.CloneAndChangeName( oldNode, "Dynamo.Nodes.DSModelElementSelection", "Select Model Element"); migrationData.AppendNode(newNode); foreach (XmlElement subNode in oldNode.ChildNodes) { newNode.AppendChild(subNode.Clone()); } return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { NodeMigrationData migrationData = new NodeMigrationData(data.Document); XmlElement oldNode = data.MigratedNodes.ElementAt(0); XmlElement newNode = MigrationManager.CloneAndChangeName( oldNode, "Dynamo.Nodes.DSEdgeSelection", "Select Edge"); migrationData.AppendNode(newNode); XmlElement newChild = data.Document.CreateElement("instance"); newChild.SetAttribute("id", oldNode.GetAttribute("edgeRef")); newNode.AppendChild(newChild); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); var oldNode = data.MigratedNodes.ElementAt(0); var newNode = MigrationManager.CloneAndChangeName( oldNode, "DSRevitNodesUI.ElementsOfType", "All Elements of Type"); migrationData.AppendNode(newNode); foreach (XmlElement subNode in oldNode.ChildNodes) { newNode.AppendChild(subNode.Clone()); } return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); XmlElement oldNode = data.MigratedNodes.ElementAt(0); XmlElement newNode = MigrationManager.CloneAndChangeName( oldNode, "Dynamo.Nodes.DSDividedSurfaceFamiliesSelection", "Select Divided Surface Families"); migrationData.AppendNode(newNode); // DO NOT clone the sub nodes. The behavior of this node changed from 0.6.3 to 0.7.0 // and we want to ensure that the user will need to reselect. //foreach (XmlElement subNode in oldNode.ChildNodes) // newNode.AppendChild(subNode.Clone()); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { System.Xml.XmlElement xmlNode = data.MigratedNodes.ElementAt(0); var element = MigrationManager.CloneAndChangeName(xmlNode, "DSIronPythonNode.PythonNode", "Python Script"); element.SetAttribute("nickname", "Python Script"); element.SetAttribute("inputcount", "1"); element.RemoveAttribute("inputs"); foreach (XmlElement subNode in xmlNode.ChildNodes) { element.AppendChild(subNode.Clone()); element.InnerText = Regex.Replace(element.InnerText, @"\bIN\b", "IN[0]"); } NodeMigrationData migrationData = new NodeMigrationData(data.Document); migrationData.AppendNode(element); return(migrationData); }
public static NodeMigrationData Migrate_0700_to_0730(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); var oldNode = data.MigratedNodes.ElementAt(0); var sunSettingNode = MigrationManager.CloneAndChangeName( oldNode, "DSRevitNodesUI.SunSettings", "SunSettings.Current"); var sunSettingsNodeId = Guid.NewGuid().ToString(); sunSettingNode.SetAttribute("guid", sunSettingsNodeId); migrationData.AppendNode(sunSettingNode); var sunPathNode = MigrationManager.CreateFunctionNodeFrom(oldNode); MigrationManager.SetFunctionSignature( sunPathNode, "RevitNodes.dll", "SunSettings.SunDirection", "SunSettings.SunDirection@var"); migrationData.AppendNode(sunPathNode); migrationData.CreateConnector(sunSettingNode, 0, sunPathNode, 0); var oldConnector = data.FindFirstConnector( new PortId(MigrationManager.GetGuidFromXmlElement(oldNode), 0, PortType.Output)); if (oldConnector != null) { migrationData.ReconnectToPort( oldConnector, new PortId( MigrationManager.GetGuidFromXmlElement(sunPathNode), 0, PortType.Output)); } return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { System.Xml.XmlElement xmlNode = data.MigratedNodes.ElementAt(0); var element = MigrationManager.CloneAndChangeName(xmlNode, "DecodesIronPythonNode.DecodesNode", "Decodes Script"); element.SetAttribute("nickname", "Decodes Script"); element.SetAttribute("inputcount", xmlNode.GetAttribute("inputs")); element.RemoveAttribute("inputs"); foreach (XmlElement subNode in xmlNode.ChildNodes) { element.AppendChild(subNode); subNode.InnerText = Regex.Replace(element.InnerText, @"\bIN[0-9]+\b", delegate(Match m) { return("IN[" + m.ToString().Substring(2) + "]"); }); } NodeMigrationData migrationData = new NodeMigrationData(data.Document); migrationData.AppendNode(element); return(migrationData); }
public static NodeMigrationData Migrate_0630_to_0700(NodeMigrationData data) { var migrationData = new NodeMigrationData(data.Document); XmlElement oldNode = data.MigratedNodes.ElementAt(0); // Create nodes XmlElement sunPathNode = MigrationManager.CloneAndChangeName( oldNode, "DSRevitNodesUI.SunPathDirection", "SunPath Direction"); sunPathNode.SetAttribute("guid", Guid.NewGuid().ToString()); sunPathNode.SetAttribute("x", (Convert.ToDouble(oldNode.GetAttribute("x")) - 230).ToString()); var vectorAsPoint = MigrationManager.CreateFunctionNodeFrom(oldNode); MigrationManager.SetFunctionSignature(vectorAsPoint, "ProtoGeometry.dll", "Vector.AsPoint", "Vector.AsPoint"); migrationData.AppendNode(sunPathNode); migrationData.AppendNode(vectorAsPoint); // Update connectors migrationData.CreateConnector(sunPathNode, 0, vectorAsPoint, 0); return migrationData; }