Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andydandy74 committed Oct 21, 2024
1 parent 3389f46 commit 3e6eba9
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 149 deletions.
21 changes: 12 additions & 9 deletions nodes/3.x/Material.Assets.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
"NodeType": "PythonScriptNode",
"Code": "import clr\r\nclr.AddReference('RevitAPI')\r\nfrom Autodesk.Revit.DB import *\r\n\r\nmats = UnwrapElement(IN[0])\r\n\r\ndef GetMaterialAssets(material):\r\n\tif hasattr(material, \"AppearanceAssetId\"): return (material.Document.GetElement(material.AppearanceAssetId), material.Document.GetElement(material.ThermalAssetId), material.Document.GetElement(material.StructuralAssetId))\r\n\telse: return (None, None, None)\r\n\r\nif isinstance(IN[0], list): OUT = map(list, zip(*[GetMaterialAssets(x) for x in mats]))\r\nelse: OUT = GetMaterialAssets(mats)",
"Engine": "CPython3",
"VariableInputPorts": true,
"Id": "ceb5af76e411467296b527cdbeca77e7",
"Inputs": [
Expand All @@ -87,7 +88,7 @@
}
],
"Replication": "Disabled",
"Description": "Runs an embedded IronPython script."
"Description": "Führt ein eingebettetes Python-Skript aus."
},
{
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Symbol, DynamoCore",
Expand All @@ -113,7 +114,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 @@ -134,7 +135,7 @@
],
"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.Output, DynamoCore",
Expand All @@ -155,7 +156,7 @@
],
"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.Output, DynamoCore",
Expand All @@ -176,7 +177,7 @@
],
"Outputs": [],
"Replication": "Disabled",
"Description": "A function output, use with custom nodes"
"Description": "Eine Funktionsausgabe zur Verwendung mit benutzerdefinierten Blöcken"
}
],
"Connectors": [
Expand Down Expand Up @@ -207,13 +208,15 @@
}
],
"Dependencies": [],
"NodeLibraryDependencies": [],
"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 Down Expand Up @@ -292,8 +295,8 @@
}
],
"Annotations": [],
"X": 236.0,
"Y": 350.0,
"Zoom": 1.0
"X": 29.765339974206768,
"Y": 225.86224202599868,
"Zoom": 1.0542982150113265
}
}
4 changes: 2 additions & 2 deletions nodes/3.x/Material.Duplicate.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,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.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\ndef DuplicateMaterial(mat, name):\r\n\ttry: return mat.Duplicate(name)\r\n\texcept: return None\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nmats = UnwrapElement(IN[0])\r\nnewnames = IN[1]\r\n\r\nTransactionManager.Instance.EnsureInTransaction(doc)\r\nif isinstance(mats, list): OUT = [DuplicateMaterial(x, y) for x, y in zip(mats, newnames)]\r\nelse: OUT = DuplicateMaterial(mats, newnames)\r\nTransactionManager.Instance.TransactionTaskDone()",
"Engine": "IronPython2",
"Engine": "CPython3",
"VariableInputPorts": true,
"Id": "2322e509409441d38689968a8eca667a",
"Inputs": [
Expand Down Expand Up @@ -233,7 +233,7 @@
"NodeLibraryDependencies": [
{
"Name": "Clockwork for Dynamo 2.x",
"Version": "2.6.0",
"Version": "2.12.1",
"ReferenceType": "Package",
"Nodes": [
"a1167851ced3411a83abf96193c76f1d"
Expand Down
Loading

0 comments on commit 3e6eba9

Please sign in to comment.