Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andydandy74 committed Feb 19, 2024
1 parent b54db41 commit 4e8c25d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions nodes/2.x/RoomSeparator.FromCurve.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"View": {
"Key": "Revit.Elements.Views.View",
"Value": "RevitNodes.dll"
},
"Autodesk.DesignScript.Geometry.Curve": {
"Key": "Autodesk.DesignScript.Geometry.Curve",
"Value": "ProtoGeometry.dll"
}
}
},
Expand All @@ -29,7 +33,7 @@
"Parameter": {
"Name": "curve",
"TypeName": "Autodesk.DesignScript.Geometry.Curve",
"TypeRank": 0,
"TypeRank": -1,
"DefaultValue": null,
"Description": ""
},
Expand Down Expand Up @@ -76,7 +80,7 @@
"Parameter": {
"Name": "view",
"TypeName": "var",
"TypeRank": -1,
"TypeRank": 0,
"DefaultValue": null,
"Description": ""
},
Expand All @@ -99,7 +103,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(\"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\nfrom RevitServices.Transactions import TransactionManager\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\ncurves = UnwrapElement(IN[0])\r\nsketchplane = UnwrapElement(IN[1])\r\nview = UnwrapElement(IN[2])\r\n\r\nTransactionManager.Instance.EnsureInTransaction(doc)\r\ncurvearray = CurveArray()\r\nfor curve in curves:\r\n\tcurvearray.Append(curve.ToRevitType())\r\ndoccreation = doc.Create\r\nseparatorarray = doccreation.NewRoomBoundaryLines(sketchplane, curvearray, view)\r\nTransactionManager.Instance.TransactionTaskDone()\r\n\r\nelementlist = list()\r\nfor item in separatorarray:\r\n\telementlist.append(item)\r\nif isinstance(curves, list): OUT = elementlist\r\nelse: OUT = elementlist[0]",
"Code": "import clr\r\nclr.AddReference('RevitAPI')\r\nfrom Autodesk.Revit.DB import *\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\nfrom RevitServices.Transactions import TransactionManager\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\ncurves = UnwrapElement(IN[0])\r\nsketchplane = UnwrapElement(IN[1])\r\nview = UnwrapElement(IN[2])\r\n\r\nTransactionManager.Instance.EnsureInTransaction(doc)\r\ncurvearray = CurveArray()\r\nfor curve in curves:\r\n\tcurvearray.Append(curve.ToRevitType())\r\ndoccreation = doc.Create\r\nseparatorarray = doccreation.NewRoomBoundaryLines(sketchplane, curvearray, view)\r\nTransactionManager.Instance.TransactionTaskDone()\r\n\r\nelementlist = list()\r\nfor item in separatorarray:\r\n\telementlist.append(item)\r\nif isinstance(IN[0], list): OUT = elementlist\r\nelse: OUT = elementlist[0]",
"Engine": "IronPython2",
"VariableInputPorts": true,
"Id": "786d1079e66a4b07a4fde72dbefe5739",
Expand Down Expand Up @@ -398,8 +402,8 @@
}
],
"Annotations": [],
"X": 323.02660995866825,
"Y": 190.64455807737011,
"Zoom": 0.63587285780705649
"X": 222.71367667670273,
"Y": 388.52639976107776,
"Zoom": 0.8386060632703336
}
}

0 comments on commit 4e8c25d

Please sign in to comment.