Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andydandy74 committed Apr 7, 2024
1 parent 765d536 commit 68ff10c
Showing 1 changed file with 131 additions and 21 deletions.
152 changes: 131 additions & 21 deletions nodes/2.x/SelectionSet.ByElements.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
"NodeType": "PythonScriptNode",
"Code": "import clr\r\nclr.AddReference('RevitAPI')\r\nfrom Autodesk.Revit.DB import *\r\nfrom System.Collections.Generic import *\r\n\r\nclr.AddReference(\"RevitNodes\")\r\nimport Revit\r\nclr.ImportExtensions(Revit.Elements)\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\nname = IN[1]\r\n\r\n# create itemset\r\nitems = UnwrapElement(IN[0])\r\nids = list()\r\nfor item in items:\r\n\tids.append(item.Id)\r\nitemset = List[ElementId](ids)\r\n\r\n# collect all existing filters from the model \r\nnames = list()\r\ncollector = FilteredElementCollector(doc)\r\nfilters = collector.OfClass(FilterElement).ToElements();\r\n\r\nselset = False\r\nTransactionManager.Instance.EnsureInTransaction(doc)\r\n# if a filter of that name already exists, delete its content\r\nfor filter in filters:\r\n\tif filter.Name == name:\r\n\t\tfilter.Clear()\r\n\t\tselset = filter\r\n# create a new selection set if it doesn't already exist\r\nif selset == False:\r\n\tselset = SelectionFilterElement.Create(doc,name)\r\n# add the items to the selection set\r\ntry: \r\n\tselset.AddSet(itemset)\r\n\tOUT = selset.ToDSType(False)\r\nexcept: OUT = None\r\nTransactionManager.Instance.TransactionTaskDone()\r\n",
"Engine": "IronPython2",
"VariableInputPorts": true,
"Id": "497f8c2991da48c6ad82483dce66eca1",
"Inputs": [
Expand Down Expand Up @@ -48,7 +49,7 @@
}
],
"Replication": "Disabled",
"Description": "Runs an embedded IronPython script."
"Description": "Führt ein eingebettetes Python-Skript aus."
},
{
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Function, DynamoCore",
Expand Down Expand Up @@ -105,7 +106,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.Symbol, DynamoCore",
Expand All @@ -131,7 +132,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 @@ -152,7 +153,73 @@
],
"Outputs": [],
"Replication": "Disabled",
"Description": "A function output, use with custom nodes"
"Description": "Eine Funktionsausgabe zur Verwendung mit benutzerdefinierten Blöcken"
},
{
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Function, DynamoCore",
"FunctionSignature": "9e586fb6-2570-4445-8556-aa20d337fb98",
"FunctionType": "Graph",
"NodeType": "FunctionNode",
"Id": "5e0936cdd2574bb1a9a824d1d9e00186",
"Inputs": [
{
"Id": "e1d9a7d0a9614d21a3737d87b5972d06",
"Name": "str",
"Description": "string",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
},
{
"Id": "7bb701a89bda42e3b7692eb09cb68ef3",
"Name": "replacement",
"Description": "string\nVorgabewert : \"_\"",
"UsingDefaultValue": true,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Outputs": [
{
"Id": "eca6cdc526214d1b9a78048c291ae604",
"Name": "str",
"Description": "Rückgabewert",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Auto",
"Description": "Replaces all characters in a string that are illegal characters for Revit view names etc."
},
{
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Symbol, DynamoCore",
"NodeType": "InputNode",
"Parameter": {
"Name": "replacementForIllegalChars",
"TypeName": "string",
"TypeRank": 0,
"DefaultValue": "\"_\"",
"Description": ""
},
"Id": "0f03d4ac1a00423ebc8886db27889938",
"Inputs": [],
"Outputs": [
{
"Id": "3eef0429e018477c8bed65682a3526bf",
"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"
}
],
"Connectors": [
Expand All @@ -168,25 +235,48 @@
},
{
"Start": "471392d684dd43038086c994455a7c2c",
"End": "09fd5b764ef543fa93b12501f32ca6e7",
"Id": "70bd7b0ba9fb4047b739a9ca03908e1d"
"End": "e1d9a7d0a9614d21a3737d87b5972d06",
"Id": "664b04d7d07b47aaac44474d726189ee"
},
{
"Start": "8983ea91ca92425da5ae41c52101cf88",
"End": "ae370cf24fe04cd1902c63262e0ee333",
"Id": "8cec3fb11a8e4d3e912eea71a9c9b5be"
},
{
"Start": "eca6cdc526214d1b9a78048c291ae604",
"End": "09fd5b764ef543fa93b12501f32ca6e7",
"Id": "9ea105e717234b979d378b0ef6a6018f"
},
{
"Start": "3eef0429e018477c8bed65682a3526bf",
"End": "7bb701a89bda42e3b7692eb09cb68ef3",
"Id": "27aaae7c8dde431d9b7a7c41f69b094c"
}
],
"Dependencies": [
"cd09ad33-8c34-4850-ac26-24448d92c38f"
"cd09ad33-8c34-4850-ac26-24448d92c38f",
"9e586fb6-2570-4445-8556-aa20d337fb98"
],
"NodeLibraryDependencies": [
{
"Name": "Clockwork for Dynamo 2.x",
"Version": "2.6.0",
"ReferenceType": "Package",
"Nodes": [
"02efed4a91a641d9a14cdc354836c16d",
"5e0936cdd2574bb1a9a824d1d9e00186"
]
}
],
"Author": "None provided",
"Bindings": [],
"View": {
"Dynamo": {
"ScaleFactor": 1.0,
"HasRunWithoutCrash": false,
"IsVisibleInDynamoLibrary": true,
"Version": "2.0.3.8810",
"Version": "2.12.1.8246",
"RunType": "Manual",
"RunPeriod": "1000"
},
Expand All @@ -210,8 +300,8 @@
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 824.415161780418,
"Y": 185.910321982136
"X": 913.37994052140061,
"Y": 223.52336880205141
},
{
"ShowGeometry": true,
Expand All @@ -220,8 +310,8 @@
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 500.415161780418,
"Y": 144.910321982136
"X": 571.77994052140059,
"Y": 182.52336880205141
},
{
"ShowGeometry": true,
Expand All @@ -230,8 +320,8 @@
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 500.415161780418,
"Y": 252.910321982136
"X": 89.379940521400613,
"Y": 263.52336880205144
},
{
"ShowGeometry": true,
Expand All @@ -240,8 +330,8 @@
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 213.41516178041798,
"Y": 144.910321982136
"X": 89.379940521400613,
"Y": 179.52336880205141
},
{
"ShowGeometry": true,
Expand All @@ -250,13 +340,33 @@
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 1048.415161780418,
"Y": 185.910321982136
"X": 1138.1799405214006,
"Y": 223.52336880205141
},
{
"ShowGeometry": true,
"Name": "String.ReplaceIllegalRevitCharacters",
"Id": "5e0936cdd2574bb1a9a824d1d9e00186",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 571.77994052140059,
"Y": 290.52336880205144
},
{
"ShowGeometry": true,
"Name": "Input",
"Id": "0f03d4ac1a00423ebc8886db27889938",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 89.379940521400613,
"Y": 346.52336880205144
}
],
"Annotations": [],
"X": 192.965532168683,
"Y": 170.126008269534,
"Zoom": 0.852017678554967
"X": -23.973162303364404,
"Y": 175.41951308515772,
"Zoom": 0.572190039474226
}
}

0 comments on commit 68ff10c

Please sign in to comment.