Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andydandy74 committed Oct 22, 2024
1 parent 84c7553 commit 78c0801
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 103 deletions.
14 changes: 7 additions & 7 deletions nodes/3.x/RoomTag.IsInRoom.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
"NodeType": "PythonScriptNode",
"Code": "import clr\r\nclr.AddReference('RevitAPI')\r\nfrom Autodesk.Revit.DB import *\r\nimport Autodesk\r\n\r\nclr.AddReference(\"RevitNodes\")\r\nimport Revit\r\nclr.ImportExtensions(Revit.GeometryConversion)\r\n\r\nclr.AddReference(\"RevitServices\")\r\nimport RevitServices\r\nfrom RevitServices.Persistence import DocumentManager\r\n\r\ndef TagIsInRoom(tag):\r\n\tif hasattr(tag, \"IsInRoom\"): return tag.IsInRoom\r\n\telse: return False\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nroomtags = UnwrapElement(IN[0])\r\n\r\nif isinstance(IN[0], list): OUT = [TagIsInRoom(x) for x in roomtags]\r\nelse: OUT = TagIsInRoom(roomtags)",
"Engine": "IronPython2",
"Engine": "CPython3",
"VariableInputPorts": true,
"Id": "7193a1fa2b344cf29174453f1e274688",
"Inputs": [
Expand Down Expand Up @@ -129,31 +129,31 @@
},
"NodeViews": [
{
"ShowGeometry": true,
"Name": "Python Script",
"Id": "7193a1fa2b344cf29174453f1e274688",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Name": "Python Script",
"ShowGeometry": true,
"Excluded": false,
"X": 334.5,
"Y": 144.23563678424824
},
{
"ShowGeometry": true,
"Name": "Input",
"Id": "3ed6c76ece454b38ad5d74b435ff26e9",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Name": "Input",
"ShowGeometry": true,
"Excluded": false,
"X": 35.5,
"Y": 144.23563678424827
},
{
"ShowGeometry": true,
"Name": "Output",
"Id": "6d0b00e8a16c48b39c90941fa8065652",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Name": "Output",
"ShowGeometry": true,
"Excluded": false,
"X": 558.5,
"Y": 144.23563678424827
Expand Down
16 changes: 9 additions & 7 deletions nodes/3.x/RoomTag.Room.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
],
"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"
"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",
Expand All @@ -55,12 +55,13 @@
],
"Outputs": [],
"Replication": "Disabled",
"Description": "A function output, use with custom nodes"
"Description": "Eine Funktionsausgabe zur Verwendung mit benutzerdefinierten Blöcken"
},
{
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
"NodeType": "PythonScriptNode",
"Code": "import clr\r\nclr.AddReference('RevitAPI')\r\nfrom Autodesk.Revit.DB import *\r\nimport Autodesk\r\n\r\nclr.AddReference(\"RevitNodes\")\r\nimport Revit\r\nclr.ImportExtensions(Revit.GeometryConversion)\r\n\r\nclr.AddReference(\"RevitServices\")\r\nimport RevitServices\r\nfrom RevitServices.Persistence import DocumentManager\r\n\r\ndef RoomByTag(tag):\r\n\troom = None\r\n\tif hasattr(tag, \"TaggedRoomId\"):\r\n\t\ttrID = tag.TaggedRoomId\r\n\t\tif trID.HostElementId.IntegerValue != -1:\r\n\t\t\troom = doc.GetElement(trID.HostElementId)\r\n\t\telif trID.LinkedElementId.IntegerValue != -1:\r\n\t\t\tlinkdoc = doc.GetElement(trID.LinkInstanceId).GetLinkDocument()\r\n\t\t\troom = linkdoc.GetElement(trID.LinkedElementId)\r\n\treturn room\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nroomtags = UnwrapElement(IN[0])\r\n\r\nif isinstance(IN[0], list): OUT = [RoomByTag(x) for x in roomtags]\r\nelse: OUT = RoomByTag(roomtags)",
"Engine": "CPython3",
"VariableInputPorts": true,
"Id": "448bb06f125d4ee7902f907d64f55279",
"Inputs": [
Expand All @@ -86,7 +87,7 @@
}
],
"Replication": "Disabled",
"Description": "Runs an embedded IronPython script."
"Description": "Führt ein eingebettetes Python-Skript aus."
}
],
"Connectors": [
Expand All @@ -103,18 +104,19 @@
],
"Dependencies": [],
"NodeLibraryDependencies": [],
"Author": "None provided",
"Bindings": [],
"View": {
"Dynamo": {
"ScaleFactor": 1.0,
"HasRunWithoutCrash": false,
"IsVisibleInDynamoLibrary": true,
"Version": "2.6.1.8786",
"Version": "2.12.1.8246",
"RunType": "Manual",
"RunPeriod": "1000"
},
"Camera": {
"Name": "Background Preview",
"Name": "Hintergrundvorschau",
"EyeX": -17.0,
"EyeY": 24.0,
"EyeZ": 50.0,
Expand Down Expand Up @@ -158,8 +160,8 @@
}
],
"Annotations": [],
"X": 229.776480044444,
"Y": 277.791613757917,
"X": -162.223519955556,
"Y": 224.99161375791704,
"Zoom": 0.847618571998227
}
}
Loading

0 comments on commit 78c0801

Please sign in to comment.