Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andydandy74 committed Dec 29, 2024
1 parent 6559e5b commit 28a0c33
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
25 changes: 14 additions & 11 deletions nodes/3.x/Element.FromDynamoSurface.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,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 @@ -64,12 +64,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\n\r\nclr.AddReference(\"RevitServices\")\r\nimport RevitServices\r\nfrom RevitServices.Persistence import DocumentManager\r\n\r\ndef ElementByFace(face, doc):\r\n\ttry: return doc.GetElement(face.Tags.LookupTag(\"RevitFaceReference\"))\r\n\texcept: return None\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nfaces = UnwrapElement(IN[0])\r\n\r\nif isinstance(IN[0], list): OUT = [ElementByFace(x, doc) for x in faces]\r\nelse: OUT = ElementByFace(faces, doc)",
"Engine": "CPython3",
"VariableInputPorts": true,
"Id": "8bab27a71bfd4158a5ca7101205e29a9",
"Inputs": [
Expand All @@ -95,7 +96,7 @@
}
],
"Replication": "Disabled",
"Description": "Runs an embedded IronPython script."
"Description": "Führt ein eingebettetes Python-Skript aus."
}
],
"Connectors": [
Expand All @@ -111,18 +112,20 @@
}
],
"Dependencies": [],
"NodeLibraryDependencies": [],
"Author": "None provided",
"Bindings": [],
"View": {
"Dynamo": {
"ScaleFactor": 1.0,
"HasRunWithoutCrash": false,
"IsVisibleInDynamoLibrary": true,
"Version": "2.0.1.5055",
"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 All @@ -135,31 +138,31 @@
},
"NodeViews": [
{
"ShowGeometry": true,
"Name": "Input",
"Id": "eda74bfc0b6e4bc192cce97715efcc88",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Name": "Input",
"ShowGeometry": true,
"Excluded": false,
"X": 282.55616224649,
"Y": -92.0655226209048
},
{
"ShowGeometry": true,
"Name": "Output",
"Id": "d5e9bf9e2e1042a3b3e645d8495ab233",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Name": "Output",
"ShowGeometry": true,
"Excluded": false,
"X": 826.55616224649,
"Y": -92.0655226209048
},
{
"ShowGeometry": true,
"Name": "Python Script",
"Id": "8bab27a71bfd4158a5ca7101205e29a9",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Name": "Python Script",
"ShowGeometry": true,
"Excluded": false,
"X": 602.55616224649,
"Y": -92.0655226209048
Expand Down
8 changes: 4 additions & 4 deletions nodes/3.x/RevitFace.FromDynamoSurface.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"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\n\r\ndef RevitFaceFromDynamoFace(dface):\r\n\ttry:\r\n\t\tref = dface.Tags.LookupTag(\"RevitFaceReference\")\r\n\t\treturn doc.GetElement(ref).GetGeometryObjectFromReference(ref)\r\n\texcept: return None\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nfaces = UnwrapElement(IN[0])\r\n\r\nif isinstance(IN[0], list): OUT = [RevitFaceFromDynamoFace(x) for x in faces]\r\nelse: OUT = RevitFaceFromDynamoFace(faces)",
"Engine": "IronPython2",
"Engine": "CPython3",
"VariableInputPorts": true,
"Id": "9f09ad843ad1445d95e393d4287a50c8",
"Inputs": [
Expand Down Expand Up @@ -169,8 +169,8 @@
}
],
"Annotations": [],
"X": -67.1645494813099,
"Y": 271.05442750685972,
"Zoom": 1.4848619772588172
"X": 142.542589596198,
"Y": 255.29229277336046,
"Zoom": 0.89416808331207331
}
}
2 changes: 1 addition & 1 deletion nodes/3.x/RevitFaceReference.FromDynamoSurface.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"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\n\r\ndef GetRevitFaceRef(face):\r\n\ttry: \r\n\t\tref = face.Tags.LookupTag(\"RevitFaceReference\")\r\n\t\ttry: stableref = ref.ConvertToStableRepresentation(doc)\r\n\t\texcept: stableref = None\r\n\t\treturn ref, stableref\r\n\texcept: return None, None\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nfaces = UnwrapElement(IN[0])\r\n\r\nif isinstance(IN[0], list): OUT = list(zip(*[GetRevitFaceRef(x) for x in faces]))\r\nelse: OUT = GetRevitFaceRef(faces)",
"Engine": "IronPython2",
"Engine": "CPython3",
"VariableInputPorts": true,
"Id": "9f09ad843ad1445d95e393d4287a50c8",
"Inputs": [
Expand Down

0 comments on commit 28a0c33

Please sign in to comment.