From 3901fa5354aca5efadc9dc8c2a7210ef53396401 Mon Sep 17 00:00:00 2001 From: Andreas Dieckmann Date: Sat, 4 Jan 2025 10:12:03 +0100 Subject: [PATCH] #415 --- nodes/3.x/FamilyInstance.FlipFromToRoom.dyf | 261 ++------------------ 1 file changed, 19 insertions(+), 242 deletions(-) diff --git a/nodes/3.x/FamilyInstance.FlipFromToRoom.dyf b/nodes/3.x/FamilyInstance.FlipFromToRoom.dyf index f63f273b..42c68c97 100644 --- a/nodes/3.x/FamilyInstance.FlipFromToRoom.dyf +++ b/nodes/3.x/FamilyInstance.FlipFromToRoom.dyf @@ -15,50 +15,10 @@ "Inputs": [], "Outputs": [], "Nodes": [ - { - "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Function, DynamoCore", - "FunctionSignature": "44ac4888-4aa4-49a9-9344-23b729c11df9", - "FunctionType": "Graph", - "NodeType": "FunctionNode", - "Id": "f495d5fa499f4d17bdb65112d1f9ee14", - "Inputs": [ - { - "Id": "bd9ddf46d67d4f50a7cf19f0d2b0753f", - "Name": "unknownItem", - "Description": "var[]..[]", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - }, - { - "Id": "3a768a449cb24a9ca7506afc008254b1", - "Name": "seq", - "Description": "var[]..[]", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [ - { - "Id": "9c41093159f2456487039b4dde2efb83", - "Name": "", - "Description": "Rückgabewert", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Auto", - "Description": "If the unknown item is not a list but rather a single item, only the first item of the list (input \"seq\") will be returned." - }, { "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels", "NodeType": "PythonScriptNode", - "Code": "import clr\r\nclr.AddReference('RevitAPI')\r\nfrom Autodesk.Revit.DB import *\r\n\r\nclr.AddReference(\"RevitServices\")\r\nimport RevitServices\r\nfrom RevitServices.Persistence import DocumentManager\r\nfrom RevitServices.Transactions import TransactionManager\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nfaminstances = UnwrapElement(IN[0])\r\nbooleans = []\r\n\r\nTransactionManager.Instance.EnsureInTransaction(doc)\r\nfor item in faminstances:\r\n try:\r\n item.FlipFromToRoom()\r\n booleans.append(True)\r\n except:\r\n booleans.append(False)\r\nTransactionManager.Instance.TransactionTaskDone()\r\n\r\nOUT = (faminstances,booleans)", + "Code": "import clr\r\nclr.AddReference('RevitAPI')\r\nfrom Autodesk.Revit.DB import *\r\n\r\nclr.AddReference(\"RevitServices\")\r\nimport RevitServices\r\nfrom RevitServices.Persistence import DocumentManager\r\nfrom RevitServices.Transactions import TransactionManager\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nfaminstances = UnwrapElement(IN[0])\r\n\r\ndef FlipRoom(item):\r\n\ttry:\r\n\t\titem.FlipFromToRoom()\r\n\t\treturn True\r\n\texcept: return False\r\n\r\nTransactionManager.Instance.EnsureInTransaction(doc)\r\nif isinstance(IN[0], list): OUT = [FlipRoom(x) for x in faminstances]\r\nelse: OUT = FlipRoom(faminstances)\r\nTransactionManager.Instance.TransactionTaskDone()", "Engine": "CPython3", "VariableInputPorts": true, "Id": "6f7aa9484fae4efaa5af5629aa63f8a0", @@ -87,37 +47,6 @@ "Replication": "Disabled", "Description": "Führt ein eingebettetes Python-Skript aus." }, - { - "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Function, DynamoCore", - "FunctionSignature": "cd09ad33-8c34-4850-ac26-24448d92c38f", - "FunctionType": "Graph", - "NodeType": "FunctionNode", - "Id": "3b20ef38aa6847bab8399c31cefe1970", - "Inputs": [ - { - "Id": "8c57e477846846c3bbe0b6d352506618", - "Name": "unknownItem", - "Description": "var[]..[]", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [ - { - "Id": "47943903a5254b42b5eaba7d567839e3", - "Name": "seq", - "Description": "Rückgabewert", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Auto", - "Description": "Turns an element (or a nested list) into a flat list" - }, { "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Symbol, DynamoCore", "NodeType": "InputNode", @@ -165,85 +94,6 @@ "Replication": "Disabled", "Description": "Eine Funktionsausgabe zur Verwendung mit benutzerdefinierten Blöcken" }, - { - "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", - "NodeType": "CodeBlockNode", - "Code": "seq[0];\nseq[1];", - "Id": "7e10930b16454833b4ebfdcef6507dd4", - "Inputs": [ - { - "Id": "68f1805bde434cada25b5d5980333b4c", - "Name": "seq", - "Description": "seq", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [ - { - "Id": "b2e2841595004ca8a1fb07613d05b4b6", - "Name": "", - "Description": "Wert des Ausdrucks in Zeile 1", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - }, - { - "Id": "ae2158e15fcc4d739e36d3f5237654ce", - "Name": "", - "Description": "Wert des Ausdrucks in Zeile 2", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Disabled", - "Description": "Ermöglicht die direkte Erstellung von DesignScript-Code." - }, - { - "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Function, DynamoCore", - "FunctionSignature": "44ac4888-4aa4-49a9-9344-23b729c11df9", - "FunctionType": "Graph", - "NodeType": "FunctionNode", - "Id": "d346fc16e7344a289b6a173a4f547d3c", - "Inputs": [ - { - "Id": "6b9582e4014b425aaaae42119ff79c1e", - "Name": "unknownItem", - "Description": "var[]..[]", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - }, - { - "Id": "5a2c0701e742460d80ac90d6bb134387", - "Name": "seq", - "Description": "var[]..[]", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [ - { - "Id": "3535d5446a0d4be498afe8460098ce46", - "Name": "", - "Description": "Rückgabewert", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Auto", - "Description": "If the unknown item is not a list but rather a single item, only the first item of the list (input \"seq\") will be returned." - }, { "ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Output, DynamoCore", "NodeType": "OutputNode", @@ -267,56 +117,23 @@ } ], "Connectors": [ - { - "Start": "9c41093159f2456487039b4dde2efb83", - "End": "70aa539ff09842a8985ee69699ac735a", - "Id": "d5fbdbfb72814582a17179a245515dbd" - }, { "Start": "349655bf48dd486cb9ac7db6aec743a3", - "End": "68f1805bde434cada25b5d5980333b4c", - "Id": "7345124114494bb29859b229cdf20119" - }, - { - "Start": "47943903a5254b42b5eaba7d567839e3", - "End": "1417b0d94e6e46f2b80bfd0a0af13bdd", - "Id": "584af07621d847309e039fb17ca9389f" - }, - { - "Start": "e6dab2b320b0402abd96bd5abaed372b", - "End": "bd9ddf46d67d4f50a7cf19f0d2b0753f", - "Id": "ee3c758571e14ecfbc9c6e0e413863fc" + "End": "20ba05e48a9041c8b714285e4331d9e2", + "Id": "992d500ecaf544d298d033fa4bb8290e" }, { "Start": "e6dab2b320b0402abd96bd5abaed372b", - "End": "8c57e477846846c3bbe0b6d352506618", - "Id": "df1afb96d166418f94b1cdbd0a46c561" + "End": "70aa539ff09842a8985ee69699ac735a", + "Id": "73f89a78c0d54be9ad41e236c560da10" }, { "Start": "e6dab2b320b0402abd96bd5abaed372b", - "End": "6b9582e4014b425aaaae42119ff79c1e", - "Id": "cf0fdec0f8c7440bafd448b4a9c3a0e0" - }, - { - "Start": "b2e2841595004ca8a1fb07613d05b4b6", - "End": "3a768a449cb24a9ca7506afc008254b1", - "Id": "7d185fd6cbbc4a7d98b9abba7fe3d3a9" - }, - { - "Start": "ae2158e15fcc4d739e36d3f5237654ce", - "End": "5a2c0701e742460d80ac90d6bb134387", - "Id": "0ab8e9e8eb62464ca9722433a2e5e11c" - }, - { - "Start": "3535d5446a0d4be498afe8460098ce46", - "End": "20ba05e48a9041c8b714285e4331d9e2", - "Id": "195d5dbaef0e406ebdd7d86b0bc59b17" + "End": "1417b0d94e6e46f2b80bfd0a0af13bdd", + "Id": "ad286f1231944d6ab002f88b887f6f27" } ], - "Dependencies": [ - "44ac4888-4aa4-49a9-9344-23b729c11df9", - "cd09ad33-8c34-4850-ac26-24448d92c38f" - ], + "Dependencies": [], "NodeLibraryDependencies": [], "Author": "None provided", "Bindings": [], @@ -342,16 +159,6 @@ "UpZ": 0.0 }, "NodeViews": [ - { - "ShowGeometry": true, - "Name": "ReturnListOrSingleValue", - "Id": "f495d5fa499f4d17bdb65112d1f9ee14", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 995.5, - "Y": 50.0571210967255 - }, { "ShowGeometry": true, "Name": "Python Script", @@ -359,18 +166,8 @@ "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 550.5, - "Y": 134.270454430059 - }, - { - "ShowGeometry": true, - "Name": "TurnIntoList", - "Id": "3b20ef38aa6847bab8399c31cefe1970", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 226.5, - "Y": 134.270454430059 + "X": 664.89047062703207, + "Y": 63.474556110167072 }, { "ShowGeometry": true, @@ -379,8 +176,8 @@ "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": -159.5, - "Y": 134.270454430059 + "X": 140.89047062703207, + "Y": 21.474556110167079 }, { "ShowGeometry": true, @@ -389,28 +186,8 @@ "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 1305.5, - "Y": 75.0571210967255 - }, - { - "ShowGeometry": true, - "Name": "Code Block", - "Id": "7e10930b16454833b4ebfdcef6507dd4", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 774.5, - "Y": 138.483787763392 - }, - { - "ShowGeometry": true, - "Name": "ReturnListOrSingleValue", - "Id": "d346fc16e7344a289b6a173a4f547d3c", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 995.5, - "Y": 184.057121096726 + "X": 889.690470627032, + "Y": -20.525443889832928 }, { "ShowGeometry": true, @@ -419,13 +196,13 @@ "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 1305.5, - "Y": 159.057121096726 + "X": 889.690470627032, + "Y": 63.474556110167072 } ], "Annotations": [], - "X": 30.0, - "Y": 375.612075769534, - "Zoom": 1.03630623520126 + "X": 158.96112506040481, + "Y": 256.51302624276025, + "Zoom": 0.45746344298496666 } } \ No newline at end of file