Created
July 7, 2025 15:52
-
-
Save cdiggins/a1caafec296d7506e6918d2460476770 to your computer and use it in GitHub Desktop.
Revit Parameter Data Model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum ParameterStorageTypeEnum | |
{ | |
Unknown = 0, | |
Integer = 1, | |
Double = 2, | |
String = 3, | |
ElementId = 4 | |
} | |
[Flags] | |
public enum ParameterFlagsEnum | |
{ | |
None, | |
IsInstance = 1 << 0, | |
IsShared = 1 << 1, | |
IsReadOnly = 1 << 2, | |
IsBuiltIn = 1 << 3, | |
IsProject = 1 << 4, | |
IsGlobal = 1 << 5, | |
} | |
public class ParameterDescriptorData | |
{ | |
public string Name { get; set; } | |
public string Group { get; set; } | |
public string ParameterType { get; set; } | |
public string Guid { get; set; } // The string representation of the parameter GUID. In Revit, this GUID only exists if IsShared is true. | |
public string DisplayUnitSpec { get; set; } // ex: "UT_Length" in Revit 2020 and prior, or "autodesk.spec.aec:length-1.0.0" in Revit 2021 and up. | |
public string DisplayUnitType { get; set; } // ex: "DUT_FEET_FRACTIONAL_INCHES" in Revit 2020 and prior, or "autodesk.unit.unit:feetFractionalInches-1.0.0" in Revit 2021 and up. | |
public string DisplayUnitLabel { get; set; } // The localized label, ex: "Feet and fractional inches" | |
public int ParameterFlags { get; set; } | |
public ParameterStorageTypeEnum StorageType { get; set; } | |
} | |
public class ParameterData | |
{ | |
public int ParameterDescriptor { get; set; } | |
public string NativeValue { get; set; } | |
public string DisplayValue { get; set; } | |
} | |
public class ParameterListData | |
{ | |
public List<ParameterData> Parameters { get; set; } = new(); | |
public List<ParameterDescriptorData> Descriptors { get; set; } = new(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment