diff --git a/NodeList.xlsx b/NodeList.xlsx index 8ea6a704..b925385b 100644 Binary files a/NodeList.xlsx and b/NodeList.xlsx differ diff --git a/nodes/2.x/Element.Assembly.dyf b/nodes/2.x/Element.Assembly.dyf new file mode 100644 index 00000000..88046a08 --- /dev/null +++ b/nodes/2.x/Element.Assembly.dyf @@ -0,0 +1,167 @@ +{ + "Uuid": "2b8008fa-9975-4cfb-ae6b-e8f1ec391639", + "IsCustomNode": true, + "Category": "Clockwork.Revit.Elements.Query", + "Description": "Retrieves the assembly an element belongs to (if any)", + "Name": "Element.Assembly", + "ElementResolver": { + "ResolutionMap": {} + }, + "Inputs": [], + "Outputs": [], + "Nodes": [ + { + "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels", + "NodeType": "PythonScriptNode", + "Code": "import clr\r\nclr.AddReference('RevitAPI')\r\nfrom Autodesk.Revit.DB import *\r\n\r\ndef GetAssembly(item):\r\n\tif hasattr(item, \"AssemblyInstanceId\"): return item.Document.GetElement(item.AssemblyInstanceId)\r\n\telse: return None\r\n\r\nitems = UnwrapElement(IN[0])\r\n\r\nif isinstance(IN[0], list): OUT = [GetAssembly(x) for x in items]\r\nelse: OUT = GetAssembly(items)", + "Engine": "IronPython2", + "VariableInputPorts": true, + "Id": "6357f24fa00c4080b41ba4a8abc0f6c0", + "Inputs": [ + { + "Id": "7237402e3c0a4f9c989242883bbf9afc", + "Name": "IN[0]", + "Description": "Input #0", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "a1d8b64193a54015a9ac35c722643a09", + "Name": "OUT", + "Description": "Ergebnis des Python-Skripts", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Führt ein eingebettetes Python-Skript aus." + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Symbol, DynamoCore", + "NodeType": "InputNode", + "Parameter": { + "Name": "element", + "TypeName": "var", + "TypeRank": -1, + "DefaultValue": null, + "Description": "" + }, + "Id": "e158165d8edf447cb92b90fc0cb323e0", + "Inputs": [], + "Outputs": [ + { + "Id": "8f8f8658123242b8a1cc2e8eb4306de9", + "Name": "", + "Description": "Symbol", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Ein Funktionsparameter zur Verwendung mit benutzerdefinierten Blöcken.\r\n\r\nSie können den Typ und den Vorgabewert für den Parameter angeben, z. B.\r\n\r\ninput : var[]..[]\r\nvalue : bool = false" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Output, DynamoCore", + "NodeType": "OutputNode", + "ElementResolver": null, + "Symbol": "assembly", + "Id": "42aff167bc914042a666f22f7bdeac02", + "Inputs": [ + { + "Id": "df4d765efa5b49d7ad4b4ff3047cf8d8", + "Name": "", + "Description": "", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [], + "Replication": "Disabled", + "Description": "Eine Funktionsausgabe zur Verwendung mit benutzerdefinierten Blöcken" + } + ], + "Connectors": [ + { + "Start": "a1d8b64193a54015a9ac35c722643a09", + "End": "df4d765efa5b49d7ad4b4ff3047cf8d8", + "Id": "e8d184a2332048278399c0420aed4e01" + }, + { + "Start": "8f8f8658123242b8a1cc2e8eb4306de9", + "End": "7237402e3c0a4f9c989242883bbf9afc", + "Id": "b44b5ce57c0e4063af444dc8c71a0461" + } + ], + "Dependencies": [], + "NodeLibraryDependencies": [], + "Author": "None provided", + "Bindings": [], + "View": { + "Dynamo": { + "ScaleFactor": 1.0, + "HasRunWithoutCrash": false, + "IsVisibleInDynamoLibrary": true, + "Version": "2.12.1.8246", + "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": "6357f24fa00c4080b41ba4a8abc0f6c0", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 250.0, + "Y": 0.0 + }, + { + "ShowGeometry": true, + "Name": "Input", + "Id": "e158165d8edf447cb92b90fc0cb323e0", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 0.0, + "Y": 0.0 + }, + { + "ShowGeometry": true, + "Name": "Output", + "Id": "42aff167bc914042a666f22f7bdeac02", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 449.80000000000007, + "Y": 0.0 + } + ], + "Annotations": [], + "X": 0.0, + "Y": 0.0, + "Zoom": 1.0 + } +} \ No newline at end of file diff --git a/nodes/2.x/python/Element.Assembly.py b/nodes/2.x/python/Element.Assembly.py new file mode 100644 index 00000000..a33d1cec --- /dev/null +++ b/nodes/2.x/python/Element.Assembly.py @@ -0,0 +1,12 @@ +import clr +clr.AddReference('RevitAPI') +from Autodesk.Revit.DB import * + +def GetAssembly(item): + if hasattr(item, "AssemblyInstanceId"): return item.Document.GetElement(item.AssemblyInstanceId) + else: return None + +items = UnwrapElement(IN[0]) + +if isinstance(IN[0], list): OUT = [GetAssembly(x) for x in items] +else: OUT = GetAssembly(items) \ No newline at end of file diff --git a/package_samples/2.x/dynamo/Revit.Elements.Assembly.dyn b/package_samples/2.x/dynamo/Revit.Elements.Assembly.dyn index 227e16e1..0f387c77 100644 --- a/package_samples/2.x/dynamo/Revit.Elements.Assembly.dyn +++ b/package_samples/2.x/dynamo/Revit.Elements.Assembly.dyn @@ -37,11 +37,20 @@ { "Id": "4ef73d23dc9a48a38e1e58c13c52eaa3", "Name": "assemblyName", - "Description": "string", + "Description": "string[]..[]", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false + }, + { + "Id": "d1bf2dc42d1c4ff087f9362c6bf47622", + "Name": "replacementForIllegalChars", + "Description": "string\nVorgabewert : \"_\"", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false } ], "Outputs": [ @@ -124,6 +133,15 @@ "Level": 2, "UseLevels": false, "KeepListStructure": false + }, + { + "Id": "17de1daced4c4fe1ba37342232ca5804", + "Name": "success", + "Description": "Rückgabewert", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false } ], "Replication": "Auto", @@ -201,36 +219,6 @@ "Replication": "Disabled", "Description": "Visualisierung der Ausgabe des Blocks" }, - { - "ConcreteType": "CoreNodeModels.CreateList, CoreNodeModels", - "VariableInputPorts": true, - "NodeType": "ExtensionNode", - "Id": "fdb53b2386824bc69e6eac5d91777c08", - "Inputs": [ - { - "Id": "775029151920438bb43707b758a677ff", - "Name": "item0", - "Description": "Item Index #0", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [ - { - "Id": "a4a4f52b779b48d5a67e8edc8eb34dc6", - "Name": "list", - "Description": "A list", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Disabled", - "Description": "Erstellt eine neue Liste aus den angegebenen Eingaben." - }, { "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", "NodeType": "ExtensionNode", @@ -648,6 +636,66 @@ ], "Replication": "Auto", "Description": "Beendet die aktuelle Dynamo-Transaktion, und gibt den übergebenen Wert zurück.\n\nTransaction.End (input: var): var[]..[]" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Function, DynamoCore", + "FunctionSignature": "2b8008fa-9975-4cfb-ae6b-e8f1ec391639", + "FunctionType": "Graph", + "NodeType": "FunctionNode", + "Id": "be02429245a04d87b38f45ac3166fc9f", + "Inputs": [ + { + "Id": "2bb00a691e3349f49cd4a86478eded46", + "Name": "element", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "a0a051abd862402f989297154980f641", + "Name": "assembly", + "Description": "Rückgabewert", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "Retrieves the assembly an element belongs to (if any)" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "NodeType": "ExtensionNode", + "Id": "a675e52a5c5440d190c5b92e014b1ee2", + "Inputs": [ + { + "Id": "2b0fb106a9e54a669ff6980923802bb2", + "Name": "", + "Description": "Block, dessen Ausgabe angezeigt wird", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "05d58ac51da947e8913cf1a9cf968557", + "Name": "", + "Description": "Blockausgabe", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualisierung der Ausgabe des Blocks" } ], "Connectors": [ @@ -673,8 +721,8 @@ }, { "Start": "3f17446430f14ff8856dd16fbe00f749", - "End": "775029151920438bb43707b758a677ff", - "Id": "6e3dbac17dad4fff86fecf39bee5be2c" + "End": "247343fa10674f248dcfacbc92448a7a", + "Id": "0690b5282ec74f1bb0743b8303868d54" }, { "Start": "6a987dbf3a9444f48005c9e03c18746d", @@ -691,11 +739,6 @@ "End": "88d5e2c63bc64c62b31659e05cacc454", "Id": "361b57ac87f14d10b43716ce3fd6f709" }, - { - "Start": "a4a4f52b779b48d5a67e8edc8eb34dc6", - "End": "247343fa10674f248dcfacbc92448a7a", - "Id": "290ed91f26524612be827948d5bab910" - }, { "Start": "d5690f1943494ec380992a969ab8e6b7", "End": "3cca4c2967624dbfad61d2456f6375a3", @@ -709,7 +752,7 @@ { "Start": "9938cd9fb04946acae797d31e7469e21", "End": "997f29bbd6844aac94af1f4b999fd599", - "Id": "8a8da209e77943a3b9d7927226841e85" + "Id": "5cdee5a3567f48638beeff70ed5d2669" }, { "Start": "ff8adcb92aee46beb46e6c0e64982045", @@ -751,20 +794,30 @@ "End": "a1736fa9080d4613aaf9a4277c2c8d3e", "Id": "c7d2f19267ea4683b72445655849a878" }, - { - "Start": "16f9ce3309ba4f5493b163a643c6c457", - "End": "86887f6e852e43f4919f1507feaad84a", - "Id": "452b2dcd6f774cce831f447b1dde58bf" - }, { "Start": "16f9ce3309ba4f5493b163a643c6c457", "End": "ed601b5b7dfd497c90577ba69ad26040", "Id": "89d735cd34c344539a216a209411c691" }, + { + "Start": "aa89ada6f8d147b2843fc069c5ef9abf", + "End": "2bb00a691e3349f49cd4a86478eded46", + "Id": "2e54f6578aea47fd9414094d83b2287c" + }, { "Start": "918c71a2f0e7494682ccba4530a157b5", "End": "96b791940d4948d290efb1c574b29a31", "Id": "638b815a7d074a27af1d73be74594b3c" + }, + { + "Start": "a0a051abd862402f989297154980f641", + "End": "2b0fb106a9e54a669ff6980923802bb2", + "Id": "43d440e207e14cbba0421a1e7cb695f6" + }, + { + "Start": "a0a051abd862402f989297154980f641", + "End": "86887f6e852e43f4919f1507feaad84a", + "Id": "5ce9877c67dc45cd9606746a3cb467ac" } ], "Dependencies": [ @@ -773,7 +826,8 @@ "d1b052e9-5d34-4a15-ab75-e9c5122fcf81", "05d3744c-a958-4e2e-94d2-d573b31b9510", "17379fdb-8640-4126-8681-c9b1f596478e", - "ecce77dc-1290-438e-a056-970b256fd553" + "ecce77dc-1290-438e-a056-970b256fd553", + "2b8008fa-9975-4cfb-ae6b-e8f1ec391639" ], "NodeLibraryDependencies": [ { @@ -791,6 +845,14 @@ "2b4c4e2500ed483eb28bce1245fa3537", "edace06deb4447b89e51bcbbf7736319" ] + }, + { + "Name": "Clockwork for Dynamo 2.x", + "Version": "2.6.0", + "ReferenceType": "Package", + "Nodes": [ + "be02429245a04d87b38f45ac3166fc9f" + ] } ], "Thumbnail": "", @@ -822,7 +884,7 @@ "ScaleFactor": 1.0, "HasRunWithoutCrash": true, "IsVisibleInDynamoLibrary": true, - "Version": "2.12.0.5650", + "Version": "2.12.1.8246", "RunType": "Manual", "RunPeriod": "1000" }, @@ -856,8 +918,8 @@ "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 5063.13582689461, - "Y": 860.63059979116167 + "X": 5671.8606439356345, + "Y": 881.54099426967 }, { "ShowGeometry": true, @@ -887,7 +949,7 @@ "IsSetAsOutput": false, "Excluded": false, "X": -722.77153254765074, - "Y": 969.219997730352 + "Y": 967.387508918357 }, { "ShowGeometry": true, @@ -899,16 +961,6 @@ "X": 614.13582689460964, "Y": 889.88059979116156 }, - { - "ShowGeometry": true, - "Name": "List Create", - "Id": "fdb53b2386824bc69e6eac5d91777c08", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": -345.86417310539036, - "Y": 889.88059979116156 - }, { "ShowGeometry": true, "Name": "Watch", @@ -936,8 +988,8 @@ "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": -115.86417310539036, - "Y": 889.88059979116156 + "X": -116.81951957881608, + "Y": 890.835946264587 }, { "ShowGeometry": true, @@ -976,8 +1028,8 @@ "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 5478.13582689461, - "Y": 860.63059979116167 + "X": 6086.8606439356345, + "Y": 881.54099426967 }, { "ShowGeometry": true, @@ -996,8 +1048,8 @@ "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 4676.13582689461, - "Y": 860.63059979116167 + "X": 5311.7244047485965, + "Y": 882.25240658325117 }, { "ShowGeometry": true, @@ -1026,8 +1078,8 @@ "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 4356.13582689461, - "Y": 880.13059979116167 + "X": 4336.048454966789, + "Y": 928.34029241793178 }, { "ShowGeometry": true, @@ -1038,6 +1090,26 @@ "Excluded": false, "X": 3335.1358268946096, "Y": 867.13059979116167 + }, + { + "ShowGeometry": true, + "Name": "Element.Assembly", + "Id": "be02429245a04d87b38f45ac3166fc9f", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 4660.4529613224013, + "Y": 932.7724878121395 + }, + { + "ShowGeometry": true, + "Name": "Watch", + "Id": "a675e52a5c5440d190c5b92e014b1ee2", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 4971.61472829111, + "Y": 954.60625882600118 } ], "Annotations": [ @@ -1048,14 +1120,14 @@ "47207a44a3994d55b5d6360e723de434", "e49e1c3a2e734b00b09c2fadf179ded4" ], - "Left": 5053.13582689461, - "Top": 807.63059979116167, - "Width": 645.0, - "Height": 331.00000000000011, + "Left": 5661.8606439356345, + "Top": 828.34099426967, + "Width": 644.60000000000036, + "Height": 330.6, "FontSize": 36.0, - "InitialTop": 860.63059979116167, + "InitialTop": 881.54099426967, "InitialHeight": 145.0, - "TextblockHeight": 43.0, + "TextblockHeight": 43.2, "Background": "#FFFF7BAC" }, { @@ -1066,14 +1138,14 @@ "bd133f0cdfd54eaaa4463ba2ba233692", "f4c079b4aea9497d84e659373a17664a" ], - "Left": -125.86417310539036, - "Top": 836.88059979116156, - "Width": 960.0, - "Height": 331.0, + "Left": -126.81951957881608, + "Top": 836.68059979116151, + "Width": 960.55534647342574, + "Height": 331.55534647342552, "FontSize": 36.0, "InitialTop": 889.88059979116156, - "InitialHeight": 145.0, - "TextblockHeight": 43.0, + "InitialHeight": 145.95534647342549, + "TextblockHeight": 43.2, "Background": "#FFC1D676" }, { @@ -1083,13 +1155,13 @@ "9ee0b35f36844999995442d9cb3b0c4f" ], "Left": -731.1844072108064, - "Top": 661.06398227540274, - "Width": 287.0, - "Height": 102.0, + "Top": 660.86398227540269, + "Width": 287.2, + "Height": 102.60000000000002, "FontSize": 36.0, "InitialTop": 714.06398227540274, "InitialHeight": 145.0, - "TextblockHeight": 43.0, + "TextblockHeight": 43.2, "Background": "#FF848484" }, { @@ -1100,13 +1172,13 @@ "54cb1dea203d42cc8872b23972d3c564" ], "Left": 934.13582689460964, - "Top": 846.63059979116156, - "Width": 614.0, - "Height": 331.0, + "Top": 846.43059979116151, + "Width": 613.59999999999991, + "Height": 330.59999999999991, "FontSize": 36.0, "InitialTop": 899.63059979116156, "InitialHeight": 145.0, - "TextblockHeight": 43.0, + "TextblockHeight": 43.2, "Background": "#FF48B9FF" }, { @@ -1119,13 +1191,13 @@ "c7d16062c774470ab9a6ef7444a65ace" ], "Left": 1648.1358268946096, - "Top": 827.13059979116156, - "Width": 1210.0, - "Height": 344.00000000000023, + "Top": 826.93059979116151, + "Width": 1209.6, + "Height": 343.60000000000014, "FontSize": 36.0, "InitialTop": 880.13059979116156, "InitialHeight": 164.5, - "TextblockHeight": 43.0, + "TextblockHeight": 43.2, "Background": "#FFFF7BAC" }, { @@ -1137,13 +1209,13 @@ "05761c26fe454a16ac3811c9d133feb4" ], "Left": 3629.1358268946096, - "Top": 814.13059979116167, - "Width": 947.0, - "Height": 344.00000000000011, + "Top": 813.93059979116163, + "Width": 926.51262807217972, + "Height": 391.80969262677024, "FontSize": 36.0, "InitialTop": 867.13059979116167, - "InitialHeight": 158.0, - "TextblockHeight": 43.0, + "InitialHeight": 206.20969262677011, + "TextblockHeight": 43.2, "Background": "#FFFF7BAC" }, { @@ -1154,15 +1226,32 @@ "c9d29d4aacff4c609cc77de51257a386" ], "Left": -734.86417310539036, - "Top": 783.5412018519711, - "Width": 289.0, - "Height": 253.67879587838092, + "Top": 783.341201851971, + "Width": 288.8, + "Height": 251.84630706638586, "FontSize": 36.0, "InitialTop": 836.5412018519711, - "InitialHeight": 277.67879587838104, - "TextblockHeight": 43.0, + "InitialHeight": 275.846307066386, + "TextblockHeight": 43.2, "Background": "#FF848484" }, + { + "Id": "6df1e6d3d5e4496dadf22e9aba5d4e1a", + "Title": "Element.Assembly", + "Nodes": [ + "be02429245a04d87b38f45ac3166fc9f", + "a675e52a5c5440d190c5b92e014b1ee2" + ], + "Left": 4650.4529613224013, + "Top": 879.57248781213946, + "Width": 540.7617669687088, + "Height": 352.4337710138617, + "FontSize": 36.0, + "InitialTop": 932.7724878121395, + "InitialHeight": 166.83377101386156, + "TextblockHeight": 43.2, + "Background": "#FF48B9FF" + }, { "Id": "9ee0b35f36844999995442d9cb3b0c4f", "Title": "Run this script on the Assembly_Sample model", @@ -1178,8 +1267,8 @@ "Background": "#FFC1D676" } ], - "X": 205.19717266698191, - "Y": 217.20469341936888, - "Zoom": 0.24169655387494152 + "X": 140.25767316698597, + "Y": 291.53433922820261, + "Zoom": 0.15210804624903879 } } \ No newline at end of file