{
  "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",
      "Engine": "IronPython2",
      "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 Python 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"
    },
    {
      "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
      "NodeType": "PythonScriptNode",
      "Code": "# Based on data-shapes Document.LengthDisplayUnit\n\nimport clr\nclr.AddReference('RevitAPI')\nfrom Autodesk.Revit.DB import*\nclr.AddReference('RevitServices')\nfrom RevitServices.Persistence import DocumentManager\n\ndoc = DocumentManager.Instance.CurrentDBDocument\n\n# Get current format options\nFOptions = Document.GetUnits(doc).GetFormatOptions(ForgeTypeId('autodesk.spec.aec:length'))\n\n# Get current unit\nUIunit = FOptions.GetUnitTypeId()\n\n# convert to meter\nOUT = UnitUtils.Convert(IN[0],UIunit,ForgeTypeId('autodesk.unit.unit:meters'))\n\n",
      "Engine": "IronPython2",
      "VariableInputPorts": true,
      "Id": "8c7f766c28cc4f31a77efe93182ff7cf",
      "Inputs": [
        {
          "Id": "eaf1dc8b091d46dd9ca3654a5a63bf3e",
          "Name": "IN[0]",
          "Description": "Input #0",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Outputs": [
        {
          "Id": "f97c6c7b31bf4602a9ff3e39d623fe36",
          "Name": "OUT",
          "Description": "Result of the python script",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Runs an embedded Python script."
    },
    {
      "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
      "NodeType": "PythonScriptNode",
      "Code": "# Based on clockwork Application.Version\r\n\r\nimport clr\r\nclr.AddReference(\"RevitServices\")\r\nimport RevitServices\r\nfrom RevitServices.Persistence import DocumentManager\r\n\r\ndoc = DocumentManager.Instance.CurrentDBDocument\r\nuiapp = DocumentManager.Instance.CurrentUIApplication\r\napp = uiapp.Application\r\n\r\nOUT = int(app.VersionNumber)",
      "Engine": "IronPython2",
      "VariableInputPorts": true,
      "Id": "5b303d3d5dba40dd98298bd5ac8c4ab9",
      "Inputs": [
        {
          "Id": "e82e44daf0944129a898fc5bf76171d8",
          "Name": "IN[0]",
          "Description": "Input #0",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Outputs": [
        {
          "Id": "00e945dea78b42918b69d7418910f14f",
          "Name": "OUT",
          "Description": "Result of the python script",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Runs an embedded Python script."
    },
    {
      "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",
      "NodeType": "FunctionNode",
      "FunctionSignature": ">@var[]..[],var[]..[]",
      "Id": "f80e70d061794bb685842637fd5b30d3",
      "Inputs": [
        {
          "Id": "dd946bd0812f48c4be9df80ee24fdf73",
          "Name": "x",
          "Description": "x value.\n\nvar[]..[]",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        },
        {
          "Id": "516a83958791405aa64ee02425095209",
          "Name": "y",
          "Description": "y value.\n\nvar[]..[]",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Outputs": [
        {
          "Id": "ba69df7fc8bc4be9bb81d47dd6b34000",
          "Name": "var[]..[]",
          "Description": "var[]..[]",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Auto",
      "Description": "x greater y?\n\n> (x: var[]..[], y: var[]..[]): var[]..[]"
    },
    {
      "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",
      "NodeType": "CodeBlockNode",
      "Code": "2021;",
      "Id": "5f41aec8409647088605e8fa3305c694",
      "Inputs": [],
      "Outputs": [
        {
          "Id": "c3d3da4007a64b96a235ac2a51efcf3c",
          "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"
    },
    {
      "ConcreteType": "CoreNodeModels.Logic.If, CoreNodeModels",
      "NodeType": "ExtensionNode",
      "Id": "297f622095bd42b2aeb7df5ae66d47da",
      "Inputs": [
        {
          "Id": "42dd2030de304592aa1ca0ff5de736dc",
          "Name": "test",
          "Description": "Boolean test",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        },
        {
          "Id": "191d19e04a2945b8a8e906fe8f5b96c8",
          "Name": "true",
          "Description": "Returned if test is true",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        },
        {
          "Id": "aac390607f6544a3a0f90a702f05c891",
          "Name": "false",
          "Description": "Returned if test is false",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Outputs": [
        {
          "Id": "08a03068ac054f85b28c0f74c853b57d",
          "Name": "result",
          "Description": "Result block produced",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Conditional statement"
    }
  ],
  "Connectors": [
    {
      "Start": "b501676612b6478dbf2e72025bb27c40",
      "End": "2eeeb6df0f15483aaa15fcf8d35df6d2",
      "Id": "7f0d019d2293492eb47afa17d0f8319b"
    },
    {
      "Start": "b501676612b6478dbf2e72025bb27c40",
      "End": "eaf1dc8b091d46dd9ca3654a5a63bf3e",
      "Id": "73bde4ae5f384e7dab082ee6a6fc9ec7"
    },
    {
      "Start": "b01f68faaa6c4d789650531ec589f7b4",
      "End": "d05ade86d5af42609323c66d5c67ff7f",
      "Id": "59e6c37518b341bc800ed06f50848cb6"
    },
    {
      "Start": "540376c1c00a42de825c63aa3cbfb101",
      "End": "3c4f4e2261b645c6822825341f259085",
      "Id": "d73cf932feb44ee1890e9f81903f4399"
    },
    {
      "Start": "ef4caa4485c94a94962f59e58fb152e4",
      "End": "aac390607f6544a3a0f90a702f05c891",
      "Id": "aa989932b8aa4ff4bb4ca50c537052de"
    },
    {
      "Start": "f97c6c7b31bf4602a9ff3e39d623fe36",
      "End": "191d19e04a2945b8a8e906fe8f5b96c8",
      "Id": "1814e66d36b94b689961c5a1d83a343d"
    },
    {
      "Start": "00e945dea78b42918b69d7418910f14f",
      "End": "dd946bd0812f48c4be9df80ee24fdf73",
      "Id": "931a03e0e70743d095b42b322288fce1"
    },
    {
      "Start": "ba69df7fc8bc4be9bb81d47dd6b34000",
      "End": "42dd2030de304592aa1ca0ff5de736dc",
      "Id": "69e44183dfe54da7a6611cdf20a718b3"
    },
    {
      "Start": "c3d3da4007a64b96a235ac2a51efcf3c",
      "End": "516a83958791405aa64ee02425095209",
      "Id": "784a648be5e647d38496c918a61fdaf6"
    },
    {
      "Start": "08a03068ac054f85b28c0f74c853b57d",
      "End": "86a6d4e81dae4118b323a5b14e5a448f",
      "Id": "36780095d1db40c1b5806089a1eadbeb"
    }
  ],
  "Dependencies": [],
  "NodeLibraryDependencies": [],
  "Bindings": [],
  "View": {
    "Dynamo": {
      "ScaleFactor": 1.0,
      "HasRunWithoutCrash": false,
      "IsVisibleInDynamoLibrary": true,
      "Version": "2.10.1.3976",
      "RunType": "Manual",
      "RunPeriod": "1000"
    },
    "Camera": {
      "Name": "Background Preview",
      "EyeX": 29.079783934082467,
      "EyeY": 16.776168007768419,
      "EyeZ": -10.906455497398817,
      "LookX": -26.796219843353708,
      "LookY": -12.611168045915392,
      "LookZ": 4.6336312099842658,
      "UpX": -0.21327446603351286,
      "UpY": 0.97629600711994025,
      "UpZ": 0.036879650483638178
    },
    "NodeViews": [
      {
        "Id": "254f4ae16e5d42c1bf4d9970684efbde",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Name": "Output",
        "ShowGeometry": true,
        "Excluded": false,
        "X": 1189.7121769290493,
        "Y": 701.656747191841
      },
      {
        "Id": "1cfe174d311b4f93bc294d02f4152ac2",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Name": "Input",
        "ShowGeometry": true,
        "Excluded": false,
        "X": -375.85417601564376,
        "Y": 488.615752914164
      },
      {
        "Id": "e5530a5429824985b5207815f0d7455a",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Name": "Code Block",
        "ShowGeometry": true,
        "Excluded": false,
        "X": 215.18714273473785,
        "Y": 67.753817906097851
      },
      {
        "Id": "dd4764e1aa794811950feebef8f6026d",
        "IsSetAsInput": true,
        "IsSetAsOutput": false,
        "Name": "Python Script",
        "ShowGeometry": true,
        "Excluded": false,
        "X": -2.2275665995848044,
        "Y": 50.203825144277772
      },
      {
        "Id": "415b231044aa4b718005da23768919b2",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Name": "Code Block",
        "ShowGeometry": true,
        "Excluded": false,
        "X": 715.52380216322445,
        "Y": 537.75
      },
      {
        "Id": "8c7f766c28cc4f31a77efe93182ff7cf",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Name": "2021",
        "ShowGeometry": true,
        "Excluded": false,
        "X": 211.83947199819158,
        "Y": 673.857919747532
      },
      {
        "Id": "5b303d3d5dba40dd98298bd5ac8c4ab9",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Name": "Revit version",
        "ShowGeometry": true,
        "Excluded": false,
        "X": 214.39712586365931,
        "Y": 880.50707472170416
      },
      {
        "Id": "f80e70d061794bb685842637fd5b30d3",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Name": ">",
        "ShowGeometry": true,
        "Excluded": false,
        "X": 476.905816022454,
        "Y": 976.40326887909123
      },
      {
        "Id": "5f41aec8409647088605e8fa3305c694",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Name": "Code Block",
        "ShowGeometry": true,
        "Excluded": false,
        "X": 229.87003292419104,
        "Y": 1044.0846960095998
      },
      {
        "Id": "297f622095bd42b2aeb7df5ae66d47da",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Name": "If",
        "ShowGeometry": true,
        "Excluded": false,
        "X": 959.1977125572173,
        "Y": 709.36213969917173
      }
    ],
    "Annotations": [
      {
        "Id": "552a6cdd76d0428a87a2adb9e46fdd5c",
        "Title": "Based on Document.LengthDisplayUnit from Data-Shapes",
        "Nodes": [],
        "Left": -53.650478555094196,
        "Top": -7.483543797364149,
        "Width": 0.0,
        "Height": 0.0,
        "FontSize": 36.0,
        "InitialTop": 0.0,
        "InitialHeight": 0.0,
        "TextblockHeight": 0.0,
        "Background": "#FFC1D676"
      }
    ],
    "X": 417.19679503053948,
    "Y": 262.56891523614593,
    "Zoom": 0.64686561309241419
  }
}