From 73148aaffb4e69571ba4269e08fd20a3bc19a805 Mon Sep 17 00:00:00 2001 From: Andreas Dieckmann Date: Sat, 16 Apr 2022 17:17:00 +0200 Subject: [PATCH] removed nodes from python dir --- nodes/2.x/BuiltInCategory.FromInput.dyf | 2 +- nodes/2.x/Category.FromInput.dyf | 2 +- .../2.x/python/BuiltInCategory.FromInput.dyf | 165 ------------------ nodes/2.x/python/Category.FromInput.dyf | 164 ----------------- 4 files changed, 2 insertions(+), 331 deletions(-) delete mode 100644 nodes/2.x/python/BuiltInCategory.FromInput.dyf delete mode 100644 nodes/2.x/python/Category.FromInput.dyf diff --git a/nodes/2.x/BuiltInCategory.FromInput.dyf b/nodes/2.x/BuiltInCategory.FromInput.dyf index c184113c..654052a2 100644 --- a/nodes/2.x/BuiltInCategory.FromInput.dyf +++ b/nodes/2.x/BuiltInCategory.FromInput.dyf @@ -1,7 +1,7 @@ { "Uuid": "7d85bda8-a044-4ba0-82bc-1f55d9e28b9f", "IsCustomNode": true, - "Category": "Clockwork.Revit.Selection.Miscellaneous", + "Category": "Clockwork.Revit.Selection.Miscellaneous.Query", "Description": "Returns a BuiltInCategory from a category, a Dynamo-wrapped category, a BuiltInCategory or a string representing a BuiltInCategory.", "Name": "BuiltInCategory.FromInput", "ElementResolver": { diff --git a/nodes/2.x/Category.FromInput.dyf b/nodes/2.x/Category.FromInput.dyf index 2599ad48..5061256b 100644 --- a/nodes/2.x/Category.FromInput.dyf +++ b/nodes/2.x/Category.FromInput.dyf @@ -1,7 +1,7 @@ { "Uuid": "3fe585a9-94df-4dce-99e1-306888ccb457", "IsCustomNode": true, - "Category": "Clockwork.Revit.Selection.Miscellaneous", + "Category": "Clockwork.Revit.Selection.Miscellaneous.Query", "Description": "Returns a category from a category, a Dynamo-wrapped category, a BuiltInCategory or a string representing a BuiltInCategory.", "Name": "Category.FromInput", "ElementResolver": { diff --git a/nodes/2.x/python/BuiltInCategory.FromInput.dyf b/nodes/2.x/python/BuiltInCategory.FromInput.dyf deleted file mode 100644 index 654052a2..00000000 --- a/nodes/2.x/python/BuiltInCategory.FromInput.dyf +++ /dev/null @@ -1,165 +0,0 @@ -{ - "Uuid": "7d85bda8-a044-4ba0-82bc-1f55d9e28b9f", - "IsCustomNode": true, - "Category": "Clockwork.Revit.Selection.Miscellaneous.Query", - "Description": "Returns a BuiltInCategory from a category, a Dynamo-wrapped category, a BuiltInCategory or a string representing a BuiltInCategory.", - "Name": "BuiltInCategory.FromInput", - "ElementResolver": { - "ResolutionMap": {} - }, - "Inputs": [], - "Outputs": [], - "Nodes": [ - { - "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels", - "NodeType": "PythonScriptNode", - "Code": "import System\r\nimport clr\r\nclr.AddReference('RevitAPI')\r\nfrom Autodesk.Revit.DB import *\r\n\r\nclr.AddReference(\"RevitNodes\")\r\nimport Revit\r\nclr.ImportExtensions(Revit.Elements)\r\n\r\nclr.AddReference(\"RevitServices\")\r\nimport RevitServices\r\nfrom RevitServices.Persistence import DocumentManager\r\n\r\ndef GetBicFromInput(var):\t\r\n\tbic = None\r\n\tif var:\r\n\t\tcattype = var.GetType().ToString()\r\n\t\tif cattype == \"Revit.Elements.Category\": bic = System.Enum.ToObject(BuiltInCategory, var.Id)\r\n\t\telif cattype == \"Autodesk.Revit.DB.BuiltInCategory\": bic = var\r\n\t\telif cattype == \"System.String\": \r\n\t\t\tfound = [x for x in bics if x.ToString() == var]\r\n\t\t\tif len(found) > 0: bic = found[0]\r\n\treturn bic\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nbics = System.Enum.GetValues(BuiltInCategory)\r\n\r\nif isinstance(IN[0], list): OUT = [GetBicFromInput(x) for x in IN[0]]\r\nelse: OUT = GetBicFromInput(IN[0])", - "VariableInputPorts": true, - "Id": "ba0f21ce28724fd184e29079fceef7d7", - "Inputs": [ - { - "Id": "d683bef5191c4d15a0f90538c935fca8", - "Name": "IN[0]", - "Description": "Input #0", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [ - { - "Id": "c2e26ed946cc42578c129e7c047b778c", - "Name": "OUT", - "Description": "Result of the python script", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Disabled", - "Description": "Runs an embedded IronPython script." - }, - { - "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Symbol, DynamoCore", - "NodeType": "InputNode", - "Parameter": { - "Name": "input", - "TypeName": "var", - "TypeRank": -1, - "DefaultValue": null, - "Description": "" - }, - "Id": "ff133d85817d42eab66db19d9f5f06d5", - "Inputs": [], - "Outputs": [ - { - "Id": "a674eef9f4514dc8a6a0a0a7cc7f4df2", - "Name": "", - "Description": "Symbol", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Disabled", - "Description": "A function parameter, use with custom nodes.\r\n\r\nYou can specify the type and default value for parameter. E.g.,\r\n\r\ninput : var[]..[]\r\nvalue : bool = false" - }, - { - "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Output, DynamoCore", - "NodeType": "OutputNode", - "ElementResolver": null, - "Symbol": "BuiltInCategory", - "Id": "d9f4a67bda374744bc8a9564a520528c", - "Inputs": [ - { - "Id": "1bae0f5a04e74445bc9d4688765aa124", - "Name": "", - "Description": "", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [], - "Replication": "Disabled", - "Description": "A function output, use with custom nodes" - } - ], - "Connectors": [ - { - "Start": "c2e26ed946cc42578c129e7c047b778c", - "End": "1bae0f5a04e74445bc9d4688765aa124", - "Id": "18d4496abaf2429b9bfb86cd3f359816" - }, - { - "Start": "a674eef9f4514dc8a6a0a0a7cc7f4df2", - "End": "d683bef5191c4d15a0f90538c935fca8", - "Id": "cfdcb15316dd4cfa83358ece3df8f164" - } - ], - "Dependencies": [], - "NodeLibraryDependencies": [], - "Bindings": [], - "View": { - "Dynamo": { - "ScaleFactor": 1.0, - "HasRunWithoutCrash": false, - "IsVisibleInDynamoLibrary": false, - "Version": "2.3.1.11775", - "RunType": "Manual", - "RunPeriod": "1000" - }, - "Camera": { - "Name": "Hintergrundvorschau", - "EyeX": -17.0, - "EyeY": 24.0, - "EyeZ": 50.0, - "LookX": 12.0, - "LookY": -13.0, - "LookZ": -58.0, - "UpX": 0.0, - "UpY": 1.0, - "UpZ": 0.0 - }, - "NodeViews": [ - { - "ShowGeometry": true, - "Name": "Python Script", - "Id": "ba0f21ce28724fd184e29079fceef7d7", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 214.5, - "Y": 0.0 - }, - { - "ShowGeometry": true, - "Name": "Input", - "Id": "ff133d85817d42eab66db19d9f5f06d5", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": -55.751040775466777, - "Y": 0.0 - }, - { - "ShowGeometry": true, - "Name": "Output", - "Id": "d9f4a67bda374744bc8a9564a520528c", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 438.5, - "Y": 0.0 - } - ], - "Annotations": [], - "X": 249.6992391222885, - "Y": 294.34137884665017, - "Zoom": 1.1713183573076464 - } -} \ No newline at end of file diff --git a/nodes/2.x/python/Category.FromInput.dyf b/nodes/2.x/python/Category.FromInput.dyf deleted file mode 100644 index 5061256b..00000000 --- a/nodes/2.x/python/Category.FromInput.dyf +++ /dev/null @@ -1,164 +0,0 @@ -{ - "Uuid": "3fe585a9-94df-4dce-99e1-306888ccb457", - "IsCustomNode": true, - "Category": "Clockwork.Revit.Selection.Miscellaneous.Query", - "Description": "Returns a category from a category, a Dynamo-wrapped category, a BuiltInCategory or a string representing a BuiltInCategory.", - "Name": "Category.FromInput", - "ElementResolver": { - "ResolutionMap": {} - }, - "Inputs": [], - "Outputs": [], - "Nodes": [ - { - "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels", - "NodeType": "PythonScriptNode", - "Code": "import System\r\nimport clr\r\nclr.AddReference('RevitAPI')\r\nfrom Autodesk.Revit.DB import *\r\n\r\nclr.AddReference(\"RevitNodes\")\r\nimport Revit\r\nclr.ImportExtensions(Revit.Elements)\r\n\r\nclr.AddReference(\"RevitServices\")\r\nimport RevitServices\r\nfrom RevitServices.Persistence import DocumentManager\r\n\r\ndef GetCatFromInput(var):\t\r\n\tcat = None\r\n\tif var:\r\n\t\tcattype = var.GetType().ToString()\r\n\t\tif cattype == \"Autodesk.Revit.DB.Category\": cat = var\r\n\t\telif cattype == \"Autodesk.Revit.DB.BuiltInCategory\": cat = Category.GetCategory(doc, var)\r\n\t\telif cattype == \"System.String\": \r\n\t\t\tfound = [x for x in bics if x.ToString() == var]\r\n\t\t\tif len(found) > 0: cat = Category.GetCategory(doc, found[0])\r\n\treturn cat\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nbics = System.Enum.GetValues(BuiltInCategory)\r\ncats = UnwrapElement(IN[0])\r\n\r\nif isinstance(IN[0], list): OUT = [GetCatFromInput(x) for x in cats]\r\nelse: OUT = GetCatFromInput(cats)", - "VariableInputPorts": true, - "Id": "f6f1249cad3f4e4ab05b14e7eeaecc45", - "Inputs": [ - { - "Id": "964688c6f593481fbf634378a144478b", - "Name": "IN[0]", - "Description": "Input #0", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [ - { - "Id": "925027689c2b485aa7f4baa432584a61", - "Name": "OUT", - "Description": "Result of the python script", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Disabled", - "Description": "Runs an embedded IronPython script." - }, - { - "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Symbol, DynamoCore", - "NodeType": "InputNode", - "Parameter": { - "Name": "category", - "TypeName": "var", - "TypeRank": -1, - "DefaultValue": null, - "Description": "" - }, - "Id": "0c0219c89cdd45e4aaa5d77d1b0c844c", - "Inputs": [], - "Outputs": [ - { - "Id": "fe4e9bd13a9041e7a1d30901323ead81", - "Name": "", - "Description": "Symbol", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Disabled", - "Description": "A function parameter, use with custom nodes.\r\n\r\nYou can specify the type and default value for parameter. E.g.,\r\n\r\ninput : var[]..[]\r\nvalue : bool = false" - }, - { - "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Output, DynamoCore", - "NodeType": "OutputNode", - "ElementResolver": null, - "Symbol": "RevitCategory", - "Id": "b5314fc9a6ae417ea10044e38d60a14a", - "Inputs": [ - { - "Id": "c03d44eb08bd47b5b6ec48bd9d46e565", - "Name": "", - "Description": "", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [], - "Replication": "Disabled", - "Description": "A function output, use with custom nodes" - } - ], - "Connectors": [ - { - "Start": "925027689c2b485aa7f4baa432584a61", - "End": "c03d44eb08bd47b5b6ec48bd9d46e565", - "Id": "44069a481fd94bb08203c3b5faa9d8d7" - }, - { - "Start": "fe4e9bd13a9041e7a1d30901323ead81", - "End": "964688c6f593481fbf634378a144478b", - "Id": "9e6b84bbcffe408faaff3d70ecab5b83" - } - ], - "Dependencies": [], - "Bindings": [], - "View": { - "Dynamo": { - "ScaleFactor": 1.0, - "HasRunWithoutCrash": false, - "IsVisibleInDynamoLibrary": false, - "Version": "2.0.4.12684", - "RunType": "Manual", - "RunPeriod": "1000" - }, - "Camera": { - "Name": "Hintergrundvorschau", - "EyeX": -17.0, - "EyeY": 24.0, - "EyeZ": 50.0, - "LookX": 12.0, - "LookY": -13.0, - "LookZ": -58.0, - "UpX": 0.0, - "UpY": 1.0, - "UpZ": 0.0 - }, - "NodeViews": [ - { - "ShowGeometry": true, - "Name": "Python Script", - "Id": "f6f1249cad3f4e4ab05b14e7eeaecc45", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 214.5, - "Y": 0.0 - }, - { - "ShowGeometry": true, - "Name": "Input", - "Id": "0c0219c89cdd45e4aaa5d77d1b0c844c", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": -64.5, - "Y": -17.0 - }, - { - "ShowGeometry": true, - "Name": "Output", - "Id": "b5314fc9a6ae417ea10044e38d60a14a", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 438.5, - "Y": 0.0 - } - ], - "Annotations": [], - "X": 215.0, - "Y": 47.0, - "Zoom": 1.0 - } -} \ No newline at end of file