278 lines
8.7 KiB
Plaintext
278 lines
8.7 KiB
Plaintext
{
|
|
"Uuid": "0a580cf8-9c53-48b1-8a4d-1acb49d472b5",
|
|
"IsCustomNode": true,
|
|
"Category": "infeeeee.Revit.Units",
|
|
"Description": "Convert from Revit display unit to meter",
|
|
"Name": "ConvertToMeter",
|
|
"ElementResolver": {
|
|
"ResolutionMap": {}
|
|
},
|
|
"Inputs": [],
|
|
"Outputs": [],
|
|
"Nodes": [
|
|
{
|
|
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Output, DynamoCore",
|
|
"NodeType": "OutputNode",
|
|
"ElementResolver": null,
|
|
"Symbol": "Meter",
|
|
"Id": "254f4ae16e5d42c1bf4d9970684efbde",
|
|
"Inputs": [
|
|
{
|
|
"Id": "86a6d4e81dae4118b323a5b14e5a448f",
|
|
"Name": "",
|
|
"Description": "",
|
|
"UsingDefaultValue": false,
|
|
"Level": 2,
|
|
"UseLevels": false,
|
|
"KeepListStructure": false
|
|
}
|
|
],
|
|
"Outputs": [],
|
|
"Replication": "Disabled",
|
|
"Description": "A function output, use with custom nodes"
|
|
},
|
|
{
|
|
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Symbol, DynamoCore",
|
|
"NodeType": "InputNode",
|
|
"Parameter": {
|
|
"Name": "length",
|
|
"TypeName": "double",
|
|
"TypeRank": 0,
|
|
"DefaultValue": null,
|
|
"Description": ""
|
|
},
|
|
"Id": "1cfe174d311b4f93bc294d02f4152ac2",
|
|
"Inputs": [],
|
|
"Outputs": [
|
|
{
|
|
"Id": "b501676612b6478dbf2e72025bb27c40",
|
|
"Name": "",
|
|
"Description": "Symbol",
|
|
"UsingDefaultValue": false,
|
|
"Level": 2,
|
|
"UseLevels": false,
|
|
"KeepListStructure": false
|
|
}
|
|
],
|
|
"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"
|
|
},
|
|
{
|
|
"ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",
|
|
"NodeType": "CodeBlockNode",
|
|
"Code": "x;\n\ny = [Imperative]\n{\nif (x == \"Millimeters\") {\nreturn = 1000;\n}\nelse if (x == \"Centimeters\" ) {\nreturn = 100;\n}\nelse if (x == \"Decimeters\" ) {\nreturn = 10;\n}\nelse if (x == \"Decimal feet\" ||\n\tx == \"Feet and fractional inches\" ) {\nreturn = 3.280839895;\n}\nelse if (x == \"Decimal inches\" ||\n\tx == \"Fractional inches\" ) {\nreturn = 39.37007874;\n}\nelse {\nreturn = 1;\n}\n};",
|
|
"Id": "e5530a5429824985b5207815f0d7455a",
|
|
"Inputs": [
|
|
{
|
|
"Id": "3c4f4e2261b645c6822825341f259085",
|
|
"Name": "x",
|
|
"Description": "x",
|
|
"UsingDefaultValue": false,
|
|
"Level": 2,
|
|
"UseLevels": false,
|
|
"KeepListStructure": false
|
|
}
|
|
],
|
|
"Outputs": [
|
|
{
|
|
"Id": "1929e12ffa7c4b6c9a49b22833621326",
|
|
"Name": "",
|
|
"Description": "Value of expression at line 1",
|
|
"UsingDefaultValue": false,
|
|
"Level": 2,
|
|
"UseLevels": false,
|
|
"KeepListStructure": false
|
|
},
|
|
{
|
|
"Id": "b01f68faaa6c4d789650531ec589f7b4",
|
|
"Name": "",
|
|
"Description": "y",
|
|
"UsingDefaultValue": false,
|
|
"Level": 2,
|
|
"UseLevels": false,
|
|
"KeepListStructure": false
|
|
}
|
|
],
|
|
"Replication": "Disabled",
|
|
"Description": "Allows for DesignScript code to be authored directly"
|
|
},
|
|
{
|
|
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
|
|
"NodeType": "PythonScriptNode",
|
|
"Code": "#Copyright (c) Data Shapes, 2018\n#Data-Shapes www.data-shapes.net , elayoubi.mostafa@data-shapes.io @data_shapes\n\nimport clr\nclr.AddReference('RevitAPI')\nfrom Autodesk.Revit.DB import*\nclr.AddReference('RevitServices')\nfrom RevitServices.Persistence import DocumentManager\n\ndoc = DocumentManager.Instance.CurrentDBDocument\nFOptions = Document.GetUnits(doc).GetFormatOptions(UnitType.UT_Length)\nUIunit = FOptions.DisplayUnits\nShow = UIunit.ToString().split('_')\ndel Show[0]\nShow = ' '.join([s.title() for s in Show])\n\nOUT = Show",
|
|
"VariableInputPorts": true,
|
|
"Id": "dd4764e1aa794811950feebef8f6026d",
|
|
"Inputs": [],
|
|
"Outputs": [
|
|
{
|
|
"Id": "540376c1c00a42de825c63aa3cbfb101",
|
|
"Name": "OUT",
|
|
"Description": "Result of the python script",
|
|
"UsingDefaultValue": false,
|
|
"Level": 2,
|
|
"UseLevels": false,
|
|
"KeepListStructure": false
|
|
}
|
|
],
|
|
"Replication": "Disabled",
|
|
"Description": "Runs an embedded IronPython script."
|
|
},
|
|
{
|
|
"ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",
|
|
"NodeType": "CodeBlockNode",
|
|
"Code": "a/b;",
|
|
"Id": "415b231044aa4b718005da23768919b2",
|
|
"Inputs": [
|
|
{
|
|
"Id": "2eeeb6df0f15483aaa15fcf8d35df6d2",
|
|
"Name": "a",
|
|
"Description": "a",
|
|
"UsingDefaultValue": false,
|
|
"Level": 2,
|
|
"UseLevels": false,
|
|
"KeepListStructure": false
|
|
},
|
|
{
|
|
"Id": "d05ade86d5af42609323c66d5c67ff7f",
|
|
"Name": "b",
|
|
"Description": "b",
|
|
"UsingDefaultValue": false,
|
|
"Level": 2,
|
|
"UseLevels": false,
|
|
"KeepListStructure": false
|
|
}
|
|
],
|
|
"Outputs": [
|
|
{
|
|
"Id": "ef4caa4485c94a94962f59e58fb152e4",
|
|
"Name": "",
|
|
"Description": "Value of expression at line 1",
|
|
"UsingDefaultValue": false,
|
|
"Level": 2,
|
|
"UseLevels": false,
|
|
"KeepListStructure": false
|
|
}
|
|
],
|
|
"Replication": "Disabled",
|
|
"Description": "Allows for DesignScript code to be authored directly"
|
|
}
|
|
],
|
|
"Connectors": [
|
|
{
|
|
"Start": "b501676612b6478dbf2e72025bb27c40",
|
|
"End": "2eeeb6df0f15483aaa15fcf8d35df6d2",
|
|
"Id": "7f0d019d2293492eb47afa17d0f8319b"
|
|
},
|
|
{
|
|
"Start": "b01f68faaa6c4d789650531ec589f7b4",
|
|
"End": "d05ade86d5af42609323c66d5c67ff7f",
|
|
"Id": "59e6c37518b341bc800ed06f50848cb6"
|
|
},
|
|
{
|
|
"Start": "540376c1c00a42de825c63aa3cbfb101",
|
|
"End": "3c4f4e2261b645c6822825341f259085",
|
|
"Id": "d73cf932feb44ee1890e9f81903f4399"
|
|
},
|
|
{
|
|
"Start": "ef4caa4485c94a94962f59e58fb152e4",
|
|
"End": "86a6d4e81dae4118b323a5b14e5a448f",
|
|
"Id": "63fba3807fb242e8b14de64b51bc9644"
|
|
}
|
|
],
|
|
"Dependencies": [],
|
|
"NodeLibraryDependencies": [],
|
|
"Bindings": [],
|
|
"View": {
|
|
"Dynamo": {
|
|
"ScaleFactor": 1.0,
|
|
"HasRunWithoutCrash": false,
|
|
"IsVisibleInDynamoLibrary": true,
|
|
"Version": "2.3.0.5885",
|
|
"RunType": "Manual",
|
|
"RunPeriod": "1000"
|
|
},
|
|
"Camera": {
|
|
"Name": "Background Preview",
|
|
"EyeX": -100626.82073850936,
|
|
"EyeY": 370777.98985935876,
|
|
"EyeZ": 186476.80299970528,
|
|
"LookX": 82993.109801009356,
|
|
"LookY": -378777.98985935876,
|
|
"LookZ": -203476.31862470528,
|
|
"UpX": 0.27844678833061143,
|
|
"UpY": 0.67559020761566158,
|
|
"UpZ": -0.682675074572229
|
|
},
|
|
"NodeViews": [
|
|
{
|
|
"ShowGeometry": true,
|
|
"Name": "Output",
|
|
"Id": "254f4ae16e5d42c1bf4d9970684efbde",
|
|
"IsSetAsInput": false,
|
|
"IsSetAsOutput": false,
|
|
"Excluded": false,
|
|
"X": 898.52380216322445,
|
|
"Y": 533.53666666666663
|
|
},
|
|
{
|
|
"ShowGeometry": true,
|
|
"Name": "Input",
|
|
"Id": "1cfe174d311b4f93bc294d02f4152ac2",
|
|
"IsSetAsInput": false,
|
|
"IsSetAsOutput": false,
|
|
"Excluded": false,
|
|
"X": 228.5238021632245,
|
|
"Y": 775.53666666666663
|
|
},
|
|
{
|
|
"ShowGeometry": true,
|
|
"Name": "Code Block",
|
|
"Id": "e5530a5429824985b5207815f0d7455a",
|
|
"IsSetAsInput": false,
|
|
"IsSetAsOutput": false,
|
|
"Excluded": false,
|
|
"X": 228.5238021632245,
|
|
"Y": 278.17666666666668
|
|
},
|
|
{
|
|
"ShowGeometry": true,
|
|
"Name": "Python Script",
|
|
"Id": "dd4764e1aa794811950feebef8f6026d",
|
|
"IsSetAsInput": true,
|
|
"IsSetAsOutput": false,
|
|
"Excluded": false,
|
|
"X": 34.5238021632245,
|
|
"Y": 273.96333333333337
|
|
},
|
|
{
|
|
"ShowGeometry": true,
|
|
"Name": "Code Block",
|
|
"Id": "415b231044aa4b718005da23768919b2",
|
|
"IsSetAsInput": false,
|
|
"IsSetAsOutput": false,
|
|
"Excluded": false,
|
|
"X": 715.52380216322445,
|
|
"Y": 537.75
|
|
}
|
|
],
|
|
"Annotations": [
|
|
{
|
|
"Id": "552a6cdd76d0428a87a2adb9e46fdd5c",
|
|
"Title": "Based on Document.LengthDisplayUnit from Data-Shapes",
|
|
"Nodes": [],
|
|
"Left": -13.338278931750665,
|
|
"Top": 156.92878338278945,
|
|
"Width": 0.0,
|
|
"Height": 0.0,
|
|
"FontSize": 36.0,
|
|
"InitialTop": 0.0,
|
|
"InitialHeight": 0.0,
|
|
"TextblockHeight": 0.0,
|
|
"Background": "#FFC1D676"
|
|
}
|
|
],
|
|
"X": 142.11249999999995,
|
|
"Y": 177.66249999999997,
|
|
"Zoom": 0.8425
|
|
}
|
|
} |