Trying a dyn script to extract a list of material colors

This commit is contained in:
Yorik van Havre 2019-12-26 19:07:00 -03:00
parent 27f44d4186
commit de9bc3ad27
1 changed files with 359 additions and 0 deletions

View File

@ -0,0 +1,359 @@
{
"Uuid": "0023acd3-7749-4d58-9f46-b59650da6367",
"IsCustomNode": false,
"Description": null,
"Name": "materials colors extractor",
"ElementResolver": {
"ResolutionMap": {}
},
"Inputs": [],
"Outputs": [],
"Nodes": [
{
"ConcreteType": "DSRevitNodesUI.Categories, DSRevitNodesUI",
"SelectedIndex": 298,
"SelectedString": "OST_Materials",
"NodeType": "ExtensionNode",
"Id": "82361ea37b8f480b9a9c6aa44d256946",
"Inputs": [],
"Outputs": [
{
"Id": "a7e3dd223a244c8d917245101f294d75",
"Name": "Category",
"Description": "The selected Category.",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Disabled",
"Description": "All built-in categories."
},
{
"ConcreteType": "DSRevitNodesUI.ElementsOfCategory, DSRevitNodesUI",
"NodeType": "ExtensionNode",
"Id": "b7eb84f689eb4932a7c4225bf8878a0a",
"Inputs": [
{
"Id": "8336c0c6b9574c359ba1c9b4f50a3480",
"Name": "Category",
"Description": "The Category",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Outputs": [
{
"Id": "766690faf90546688c55c858372c5857",
"Name": "Elements",
"Description": "An element type.",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Disabled",
"Description": "Get all elements of the specified category from the model."
},
{
"ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",
"NodeType": "FunctionNode",
"FunctionSignature": "Revit.Elements.Material.Name",
"Id": "9bc3e1e27cbb45728951ddfd22a5ff84",
"Inputs": [
{
"Id": "cbe118db868f42d1a370c7bf3146b9d3",
"Name": "material",
"Description": "Revit.Elements.Material",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Outputs": [
{
"Id": "69ad375efd9d498d92f3050fad2e30ba",
"Name": "string",
"Description": "string",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Auto",
"Description": "Get Material Name\n\nMaterial.Name: string"
},
{
"ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",
"NodeType": "FunctionNode",
"FunctionSignature": "Revit.Elements.Material.Color",
"Id": "81e3ccdfff6d4faf8022459101229594",
"Inputs": [
{
"Id": "d50079d698eb4975bea9f440370cb6d0",
"Name": "material",
"Description": "Revit.Elements.Material",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Outputs": [
{
"Id": "dad6bcc6cd104742902e85d0de2611f7",
"Name": "Color",
"Description": "Color",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Auto",
"Description": "Get color\n\nMaterial.Color: Color"
},
{
"ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",
"NodeType": "FunctionNode",
"FunctionSignature": "DSOffice.Data.ExportCSV@string,var[][]",
"Id": "dd25c5b04c9340e9bb49dffd83fddce2",
"Inputs": [
{
"Id": "111e679cda364599890248702dc2e8bb",
"Name": "filePath",
"Description": "Path to write to\n\nstring",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
},
{
"Id": "ff782123dbb34910ab53a2215025bb4c",
"Name": "data",
"Description": "List of lists to write into CSV\n\nvar[][]",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Outputs": [
{
"Id": "35eeb281aa854a4e97037d19ec201593",
"Name": "void",
"Description": "void",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Auto",
"Description": "Write a list of lists into a file using a comma-separated values format. Outer list represents rows, inner lists represent columns.\n\nData.ExportCSV (filePath: string, data: var[][]): void"
},
{
"ConcreteType": "CoreNodeModels.CreateList, CoreNodeModels",
"VariableInputPorts": true,
"NodeType": "ExtensionNode",
"Id": "c6f071d61e1f4973b1969c1ef5c44b4e",
"Inputs": [
{
"Id": "879342dd425b48fd9978538641ba524f",
"Name": "item0",
"Description": "Item Index #0",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
},
{
"Id": "fe3ced99d300429b8e19362c630d7efe",
"Name": "item1",
"Description": "Item Index #1",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Outputs": [
{
"Id": "552aa6c2dfb1460bb77971651e9826ed",
"Name": "list",
"Description": "A list",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Disabled",
"Description": "Makes a new list out of the given inputs"
},
{
"ConcreteType": "CoreNodeModels.Input.Filename, CoreNodeModels",
"HintPath": "Z:\\output.csv",
"InputValue": "Z:\\output.csv",
"NodeType": "ExtensionNode",
"Id": "c6068b5968c44d97bbe06d3b228b9fe8",
"Inputs": [],
"Outputs": [
{
"Id": "8c5d478bfb43425fa9767440cfc89aaf",
"Name": "",
"Description": "Filename",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Disabled",
"Description": "Allows you to select a file on the system to get its filename"
}
],
"Connectors": [
{
"Start": "a7e3dd223a244c8d917245101f294d75",
"End": "8336c0c6b9574c359ba1c9b4f50a3480",
"Id": "21e143edc6974d27a9d8ac42b25136a1"
},
{
"Start": "766690faf90546688c55c858372c5857",
"End": "cbe118db868f42d1a370c7bf3146b9d3",
"Id": "9e32d6a9c04e4686a8a6a37cca0c7a70"
},
{
"Start": "766690faf90546688c55c858372c5857",
"End": "d50079d698eb4975bea9f440370cb6d0",
"Id": "9f578e9d5b4e4a3e9d99a60e06d9566d"
},
{
"Start": "69ad375efd9d498d92f3050fad2e30ba",
"End": "879342dd425b48fd9978538641ba524f",
"Id": "e1481d62a7964ba39a7c128a7b00e68e"
},
{
"Start": "dad6bcc6cd104742902e85d0de2611f7",
"End": "fe3ced99d300429b8e19362c630d7efe",
"Id": "0d1860d89cf14d8190e01880e4df8521"
},
{
"Start": "552aa6c2dfb1460bb77971651e9826ed",
"End": "ff782123dbb34910ab53a2215025bb4c",
"Id": "b88714d8f15647aa91441e70d249f421"
},
{
"Start": "8c5d478bfb43425fa9767440cfc89aaf",
"End": "111e679cda364599890248702dc2e8bb",
"Id": "bfb6c58b384c4f5fb8c4f89d142f9ec1"
}
],
"Dependencies": [],
"Bindings": [],
"View": {
"Dynamo": {
"ScaleFactor": 1.0,
"HasRunWithoutCrash": true,
"IsVisibleInDynamoLibrary": true,
"Version": "2.2.1.5175",
"RunType": "Manual",
"RunPeriod": "1000"
},
"Camera": {
"Name": "Background Preview",
"EyeX": -17.0,
"EyeY": 24.0,
"EyeZ": 50.0,
"LookX": 12.0,
"LookY": -13.0,
"LookZ": -58.0,
"UpX": 0.0,
"UpY": 1.0,
"UpZ": 0.0
},
"NodeViews": [
{
"ShowGeometry": true,
"Name": "Categories",
"Id": "82361ea37b8f480b9a9c6aa44d256946",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 41.5,
"Y": 224.0
},
{
"ShowGeometry": true,
"Name": "All Elements of Category",
"Id": "b7eb84f689eb4932a7c4225bf8878a0a",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 236.5,
"Y": 225.0
},
{
"ShowGeometry": true,
"Name": "Material.Name",
"Id": "9bc3e1e27cbb45728951ddfd22a5ff84",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 466.5,
"Y": 167.0
},
{
"ShowGeometry": true,
"Name": "Material.Color",
"Id": "81e3ccdfff6d4faf8022459101229594",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 464.93916913946578,
"Y": 259.38724035608311
},
{
"ShowGeometry": true,
"Name": "Data.ExportCSV",
"Id": "dd25c5b04c9340e9bb49dffd83fddce2",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 973.22106824925834,
"Y": 133.79970326409494
},
{
"ShowGeometry": true,
"Name": "List Create",
"Id": "c6f071d61e1f4973b1969c1ef5c44b4e",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 717.93916913946578,
"Y": 206.84718100890206
},
{
"ShowGeometry": true,
"Name": "File Path",
"Id": "c6068b5968c44d97bbe06d3b228b9fe8",
"IsSetAsInput": false,
"IsSetAsOutput": false,
"Excluded": false,
"X": 718.02522255192889,
"Y": 49.7166172106825
}
],
"Annotations": [],
"X": 122.62249999999995,
"Y": 174.6125,
"Zoom": 0.8425
}
}