The Revit API provides a default, native, and built-in way to group parameters with the BuiltInParameterGroup enumeration. A few typical values have been appended below for reference:
…
PG_TEXT
PG_PATTERN
PG_CONSTRAINTS
PG_PHASING
PG_MECHANICAL
PG_STRUCTURAL
PG_PLUMBING
PG_ELECTRICAL
PG_MATERIALS
PG_GRAPHICS
PG_CONSTRUCTION
PG_GEOMETRY
PG_IDENTITY_DATA
INVALID
Each enumeration value is supposed to match a group name in the Element Properties UI of the Revit product. For example, PG_CONSTRAINTS matches the Constraints group name. The INVALID value is confusing but it may just indicate some Parameter instances cannot find a group match in the UI.
Revit Parameter Organizer can organize various Revit parameters such as Shared Parameters, Family Parameters, Project Parameters and Built-in Parameter in many good ways.
Now let’s look at some code which can figure out what BuiltInParameter values belong to which BuiltInParameterGroup. The code does not take into account shared parameters as they are somewhat arbitrary.
List<Element> allElements = ElementFinder.FindAllElements(CachedDoc);
Dictionary<BuiltInParameterGroup, List<BuiltInParameter>> dict =
new Dictionary<BuiltInParameterGroup, List<BuiltInParameter>>();
foreach (Element e in allElements)
{
foreach (Parameter p in e.Parameters)
{
if (p.IsShared)
continue;
if (!dict.ContainsKey(p.Definition.ParameterGroup))
{
dict.Add(p.Definition.ParameterGroup, new List<BuiltInParameter>());
}
BuiltInParameter biParam = (p.Definition as InternalDefinition).BuiltInParameter;
if (!dict[p.Definition.ParameterGroup].Contains(biParam) )
{
dict[p.Definition.ParameterGroup].Add(biParam);
}
}
}
using (StreamWriter sw = new StreamWriter(@"c:\ParameterGroups.txt"))
{
foreach (KeyValuePair<BuiltInParameterGroup, List<BuiltInParameter>> kvp in dict)
{
sw.WriteLine(kvp.Key);
foreach (BuiltInParameter v in kvp.Value)
{
sw.WriteLine(string.Format(" {0}", v));
}
}
}
The ElementFinder.FindAllElements help method is also appended below to make the above code complete:
public class ElementFinder
{
public static List<Element> FindAllElements(RvtDocument doc)
{
List<Element> list = new List<Element>();
FilteredElementCollector finalCollector = new FilteredElementCollector(doc);
ElementIsElementTypeFilter filter1 = new ElementIsElementTypeFilter (false);
finalCollector.WherePasses(filter1);
ElementIsElementTypeFilter filter2 = new ElementIsElementTypeFilter (true);
finalCollector.UnionWith((new FilteredElementCollector(doc)).WherePasses(filter2));
list = finalCollector.ToList<Element>();
return list;
}
}
By the way, it was created in a second by Element Finder of RevitAddinWizard.
The content of the file ParameterGroups.txt may look like the following depending on what model the code will be tried on (bigger models with more parameters and varieties will yield more comprehensive results):
PG_GRAPHICS
DIM_STYLE_CENTERLINE_TICK_MARK
DIM_STYLE_FLIPPED_DIM_LINE_EXTENSION
DIM_LINE_EXTENSION
WITNS_LINE_EXTENSION
DIM_STYLE_CENTERLINE_SYMBOL
DIM_LEADER_ARROWHEAD
DIM_STYLE_CENTERLINE_PATTERN
ORDINATE_DIM_SETTING
DIM_STYLE_DIM_LINE_SNAP_DIST
LINE_PEN
WITNS_LINE_GAP_TO_ELT
LINEAR_DIM_TYPE
DIM_STYLE_INTERIOR_TICK_MARK
DIM_WITNS_LINE_CNTRL
TICK_MARK_PEN
DIM_WITNS_LINE_EXTENSION_BELOW
LINE_COLOR
DATUM_BUBBLE_END_1
DATUM_BUBBLE_END_2
LINE_PATTERN
LEVEL_HEAD_TAG
VIEW_DISCIPLINE
VIEW_MODEL_DISPLAY_MODE
VIEW_CLEAN_JOINS
VIEW_SCALE_PULLDOWN_IMPERIAL
VIEW_ANALYSIS_DISPLAY_STYLE
PLAN_VIEW_NORTH
VIEW_DETAIL_LEVEL
GRAPHIC_DISPLAY_OPTIONS
VIEW_SCALE
VIEW_UNDERLAY_ORIENTATION
MODEL_GRAPHICS_STYLE
VIEW_UNDERLAY_ID
VIEW_VISIBLE_CATEGORIES
COLOR_SCHEME_LOCATION
VIEW_GRAPH_SUN_PATH
VIEW_SCHEMA_SETTING_FOR_BUILDING
COARSE_SCALE_FILL_PATTERN_ID_PARAM
COARSE_SCALE_FILL_PATTERN_COLOR
GRID_BUBBLE_END_1
GRID_END_SEGMENT_PATTERN
DATUM_BUBBLE_LOCATION_IN_ELEV
GRID_END_SEGMENT_WEIGHT
GRID_END_SEGMENT_COLOR
GRID_HEAD_TAG
GRID_BUBBLE_END_2
GRID_CENTER_SEGMENT_STYLE
TEXT_BOX_VISIBILITY
LEADER_ARROWHEAD
LEADER_OFFSET_SHEET
TEXT_BACKGROUND
COLOR_FILL_FILTERED_PARAM
TEXT_COLOR
SHOW_TITLE
COLOR_FILL_SWATCH_HEIGHT_PARAM
COLOR_FILL_SWATCH_WIDTH_PARAM
ELEV_SYMBOL_ID
VIEWPORT_ATTR_LABEL_TAG
VIEWPORT_ATTR_SHOW_LABEL
VIEWPORT_ATTR_SHOW_EXTENSION_LINE
RAMP_ATTR_TEXT_FONT
RAMP_ATTR_TEXT_SIZE
LEADER_ARROW_WIDTH
ARROW_SIZE
ARROW_FILLED
ARROW_TYPE
HEAVY_END_PEN
ANY_PATTERN_ID_PARAM_NO_NO
FILLED_REGION_BACKGROUND
VIEWER_REFERENCE_LABEL
SECTION_COARSER_SCALE_PULLDOWN_IMPERIAL
VIS_GRAPHICS_IMPORT
VIS_GRAPHICS_FILTERS
VIS_GRAPHICS_ANNOTATION
VIS_GRAPHICS_MODEL
SPOT_ELEV_LEADER_ARROWHEAD
SPOT_ELEV_LINE_PEN
SPOT_ELEV_TICK_MARK_PEN
SPOT_ELEV_SYMBOL
SECTION_ATTR_HEAD_TAG
SECTION_BROKEN_DISPLAY_STYLE
SECTION_ATTR_TAIL_TAG
STAIRS_ATTR_TEXT_SIZE
STAIRS_ATTR_BREAK_SYM_IN_CUTLINE
STAIRS_ATTR_TEXT_FONT
CALLOUT_CORNER_SHEET_RADIUS
CALLOUT_ATTR_HEAD_TAG
VIEWER_REFERENCE_LABEL_TEXT
CALLOUT_TAG
SECTION_TAG
ELEVATN_TAG
POCHE_MAT_ID
VIEWPORT_DETAIL_NUMBER
VIEWPORT_ATTR_ORIENTATION_ON_SHEET
BASELINE_DIM_OFFSET
SHEET_SCALE
ARC_LEADER_PARAM
KEEP_READABLE
TEXT_ALIGN_HORZ
LEADER_LEFT_ATTACHMENT
LEADER_RIGHT_ATTACHMENT
ARC_WALL_CNTR_MRK_VISIBLE
STAIRS_INST_DOWN_LABEL_TEXT
STAIRS_INST_UP_LABEL_TEXT
STAIRS_INST_UP_LABEL_ON
STAIRS_INST_UP_ARROW_ON
STAIRS_INST_ALWAYS_UP
STAIRS_INST_DOWN_ARROW_ON
STAIRS_INST_DOWN_LABEL_ON
SPOT_SLOPE_LEADER_LENGTH
SPOT_SLOPE_SLOPE_DIRECTION
REFERENCE_VIEWER_ATTR_TAG
INVALID
PG_TEXT
DIM_STYLE_READ_CONVENTION
DIM_STYLE_SHOW_OPENING_HT
TEXT_SIZE
TEXT_STYLE_BOLD
TEXT_STYLE_UNDERLINE
TEXT_DIST_TO_LINE
TEXT_FONT
DIM_TEXT_BACKGROUND
TEXT_STYLE_ITALIC
TEXT_WIDTH_SCALE
DIM_STYLE_LINEAR_UNITS
TEXT_TAB_SIZE
TEXT_STYLE_SIZE
TEXT_STYLE_FONT
DIM_STYLE_ANGULAR_UNITS
MODEL_TEXT_SIZE
CONTOUR_LABELS_LINEAR_UNITS
CONTOUR_LABELS_PRIMARY_ONLY
SPOT_ELEV_IND_BOTTOM
SPOT_ELEV_TEXT_HORIZ_OFFSET
SPOT_ELEV_TEXT_ORIENTATION
SPOT_ELEV_IND_TOP
SPOT_ELEV_IND_TYPE_TOP
SPOT_ELEV_IND_TYPE_BOTTOM
SPOT_ELEV_IND_ELEVATION
SPOT_ELEV_BASE
SPOT_ELEV_TEXT_LOCATION
SPOT_ELEV_IND_TYPE_ELEVATION
SPOT_TEXT_FROM_LEADER
PROPERTY_LENGTH_UNITS
SPOT_COORDINATE_INCLUDE_ELEVATION
SPOT_ELEV_TOP_VALUE
SPOT_ELEV_BOT_VALUE
SPOT_ELEV_IND_TYPE
SPOT_ELEV_IND_NS
SPOT_ELEV_IND_EW
SPOT_COORDINATE_BASE
DIM_VALUE_LENGTH
SPOT_DIM_STYLE_SLOPE_UNITS
PG_GEOMETRY
LEVEL_ATTR_ROOM_COMPUTATION_HEIGHT
LEVEL_ATTR_ROOM_COMPUTATION_AUTOMATIC
RAMP_MAX_RUN_LENGTH
CURTAIN_WALL_SYSPANEL_THICKNESS
INVALID
RECT_MULLION_WIDTH2
RECT_MULLION_WIDTH1
RENDER_PLANT_HEIGHT
FAMILY_HEIGHT_PARAM
FAMILY_ROUGH_WIDTH_PARAM
FAMILY_ROUGH_HEIGHT_PARAM
GENERIC_THICKNESS
CASEWORK_WIDTH
CONTINUOUS_FOOTING_TOP_HEEL
CONTINUOUS_FOOTING_DEFAULT_END_EXTENSION_LENGTH
CONTINUOUS_FOOTING_BREAK_AT_INSERTS_DISABLE
CONTINUOUS_FOOTING_THICKNESS
CONTINUOUS_FOOTING_TOP_TOE
HOST_VOLUME_COMPUTED
INSTANCE_LENGTH_PARAM
ROOF_SLOPE
HOST_AREA_COMPUTED
ROOF_ATTR_THICKNESS_PARAM
CURVE_ELEM_LENGTH
FLOOR_ATTR_THICKNESS_PARAM
HOST_PERIMETER_COMPUTED
CURTAIN_WALL_PANELS_HEIGHT
CURTAIN_WALL_PANELS_WIDTH
PROPERTY_AREA
PROJECTED_SURFACE_AREA
SURFACE_AREA
ROOM_VOLUME
ROOM_HEIGHT
ROOM_PERIMETER
ROOM_AREA
RASTER_SHEETHEIGHT
RASTER_MAINTAIN_ASPECT_RATIO
RASTER_HORIZONTAL_SCALE
RASTER_VERTICAL_SCALE
RASTER_SHEETWIDTH
STAIRS_RAILING_BALUSTER_SLOPE_ANGLE
STAIRS_RAILING_BALUSTER_BOTTOM_ANGLE
STAIRS_RAILING_BALUSTER_HEIGHT
STAIRS_RAILING_BALUSTER_TOP_ANGLE
STAIRS_ACTUAL_NUM_RISERS
STAIRS_ACTUAL_TREAD_DEPTH
STAIRS_DESIRED_NUM_RISERS
STAIRS_ATTR_TREAD_WIDTH
STAIRS_ACTUAL_RISER_HEIGHT
ZONE_PERIMETER
ZONE_AREA_GROSS
ZONE_VOLUME_GROSS
ZONE_AREA
ZONE_VOLUME
PG_CONSTRAINTS
LEVEL_RELATIVE_BASE_TYPE
LEVEL_ELEV
FAMILY_HOSTING_BEHAVIOR
CURTAIN_WALL_SYSPANEL_OFFSET
WALL_SWEEP_DEFAULT_SETBACK_PARAM
WALL_SWEEP_CUTS_WALL_PARAM
WALL_SWEEP_CUT_BY_INSERTS_PARAM
MULLION_OFFSET
MULLION_ANGLE
SPOT_ELEV_ROTATE_WITH_COMPONENT
FAMILY_TOP_LEVEL_OFFSET_PARAM
FAMILY_TOP_LEVEL_PARAM
INSTANCE_MOVES_WITH_GRID_PARAM
COLUMN_LOCATION_MARK
SLANTED_COLUMN_TYPE_PARAM
FAMILY_BASE_LEVEL_OFFSET_PARAM
FAMILY_BASE_LEVEL_PARAM
BEAM_V_JUSTIFICATION_OTHER_VALUE
STRUCTURAL_BEAM_ORIENTATION
STRUCTURAL_BEAM_END1_ELEVATION
INSTANCE_REFERENCE_LEVEL_PARAM
STRUCTURAL_BEAM_END0_ELEVATION
STRUCTURAL_BEND_DIR_ANGLE
BEAM_V_JUSTIFICATION
BEAM_H_JUSTIFICATION
SKETCH_PLANE_PARAM
RELATED_TO_MASS
WALL_ATTR_ROOM_BOUNDING
ROOF_UPTO_LEVEL_PARAM
ROOF_BASE_LEVEL_PARAM
ROOF_LEVEL_OFFSET_PARAM
ROOF_UPTO_LEVEL_OFFSET_PARAM
ROOF_CURVE_IS_SLOPE_DEFINING
ROOF_CURVE_HEIGHT_OFFSET
LEVEL_PARAM
FLOOR_HEIGHTABOVELEVEL_PARAM
CURVE_LEVEL
CURVE_IS_SLOPE_DEFINING
DEFINES_CONSTANT_HEIGHT
CURVE_HEIGHT_OFFSET
WALL_HEIGHT_TYPE
WALL_BASE_OFFSET
WALL_BOTTOM_EXTENSION_DIST_PARAM
WALL_USER_HEIGHT_PARAM
WALL_BASE_CONSTRAINT
WALL_BOTTOM_IS_ATTACHED
WALL_TOP_EXTENSION_DIST_PARAM
WALL_TOP_IS_ATTACHED
WALL_TOP_OFFSET
WALL_KEY_REF_PARAM
INSTANCE_FREE_HOST_PARAM
INSTANCE_FREE_HOST_OFFSET_PARAM
INSTANCE_OFFSET_POS_PARAM
FAMILY_LEVEL_PARAM
ROOM_UPPER_OFFSET
ROOM_LOWER_OFFSET
ROOM_LEVEL_ID
ROOM_UPPER_LEVEL
INSTANCE_SILL_HEIGHT_PARAM
STAIRS_RAILING_BASE_LEVEL_PARAM
STAIRS_RAILING_HEIGHT_OFFSET
INSTANCE_ELEVATION_PARAM
STAIRS_BASE_OFFSET
STAIRS_BASE_LEVEL_PARAM
STAIRS_TOP_LEVEL_PARAM
STAIRS_MULTISTORY_TOP_LEVEL_PARAM
STAIRS_TOP_OFFSET
ZONE_LEVEL_ID
PG_IDENTITY_DATA
DATUM_TEXT
VIEW_REFERENCING_DETAIL
VIEW_REFERENCING_SHEET
VIEW_DESCRIPTION
VIEW_NAME
VIEW_DEFAULT_TEMPLATE
VIEW_DEPENDENCY
WINDOW_TYPE_ID
DOOR_FIRE_RATING
ALL_MODEL_MANUFACTURER
KEYNOTE_PARAM
UNIFORMAT_DESCRIPTION
UNIFORMAT_CODE
ALL_MODEL_COST
ALL_MODEL_DESCRIPTION
ALL_MODEL_URL
ALL_MODEL_TYPE_COMMENTS
ALL_MODEL_MODEL
DOOR_NUMBER
ALL_MODEL_INSTANCE_COMMENTS
OMNICLASS_DESCRIPTION
OMNICLASS_CODE
WALL_SWEEP_WALL_SUBCATEGORY_ID
LOAD_NATURE_NAME
LOAD_CASE_NAME
VIEWPORT_SHEET_NAME
VIEWPORT_SHEET_NUMBER
ROOM_NAME
PROPERTY_SUBCATEGORY_ID
RENDER_RPC_PROPERTIES
RENDER_RPC_FILENAME
ROOM_NUMBER
ROOM_FINISH_BASE
INVALID
ROOM_FINISH_FLOOR
ROOM_FINISH_WALL
ROOM_DEPARTMENT
ROOM_OCCUPANCY
ROOM_FINISH_CEILING
SHEET_CHECKED_BY
SHEET_APPROVED_BY
SHEET_CURRENT_REVISION_ISSUED
SHEET_CURRENT_REVISION_DATE
SHEET_CURRENT_REVISION_DESCRIPTION
SHEET_NAME
SHEET_CURRENT_REVISION
SHEET_DESIGNED_BY
SHEET_CURRENT_REVISION_ISSUED_BY
SHEET_CURRENT_REVISION_ISSUED_TO
SHEET_ISSUE_DATE
SHEET_SCHEDULED
SHEET_REVISIONS_ON_SHEET
SHEET_NUMBER
SHEET_HEIGHT
SHEET_WIDTH
RASTER_SYMBOL_PIXELHEIGHT
RASTER_SYMBOL_HEIGHT
RASTER_SYMBOL_WIDTH
RASTER_SYMBOL_RESOLUTION
RASTER_SYMBOL_VIEWNAME
RASTER_SYMBOL_PIXELWIDTH
COVER_TYPE_NAME
ZONE_NAME
BASEPOINT_NORTHSOUTH_PARAM
BASEPOINT_EASTWEST_PARAM
BASEPOINT_ELEVATION_PARAM
BASEPOINT_ANGLETON_PARAM
STRUCT_CONNECTION_TYPE_NAME
PG_VIEW_EXTENTS
DATUM_VOLUME_OF_INTEREST
VIEWER_CROP_REGION
VIEW_BACK_CLIPPING
VIEWER_VOLUME_OF_INTEREST_CROP
PLAN_VIEW_RANGE
VIEWER_ANNOTATION_CROP_ACTIVE
PLAN_VIEW_LEVEL
VIEWER_CROP_REGION_VISIBLE
VIEWER_BOUND_FAR_CLIPPING
ELEV_ASSOC_DATUM
VIEWER_BOUND_OFFSET_FAR
VIEW_SLANTED_COLUMN_SYMBOL_OFFSET
VIEWER_CROP_REGION_DISABLED
VIEWER_BOUND_ACTIVE_FAR
VIEWER_MODEL_CLIP_BOX_ACTIVE
SECTION_PARENT_VIEW_NAME
PG_PHASING
VIEW_PHASE
VIEW_PHASE_FILTER
PHASE_CREATED
PHASE_DEMOLISHED
ROOM_PHASE
ZONE_PHASE
INVALID
VIEW_FIXED_SKETCH_PLANE
RAMP_ATTR_SHAPE
RAMP_ATTR_MIN_INV_SLOPE
FAMILY_SHARED
FAMILY_ALWAYS_VERTICAL
CENTER_MARK_SIZE
RADIUS_PREFIX
ARC_CENTER_MARK
MULLION_FAM_TYPE
CONTOUR_LABELS_ELEV_BASE_TYPE
PROPERTY_AREA_UNITS
INVALID
SKETCH_GRID_SPACING_PARAM
BR_ORG_FILTER
BR_ORG_FOLDERS
PROJECT_REVISION_REVISION_ISSUED_BY
PROJECT_REVISION_REVISION_ISSUED
PROJECT_REVISION_REVISION_NUM
PROJECT_REVISION_REVISION_ISSUED_TO
PROJECT_REVISION_SEQUENCE_NUM
PROJECT_REVISION_REVISION_DESCRIPTION
PROJECT_REVISION_REVISION_DATE
PROJECT_REVISION_ENUMERATION
PROJECT_STATUS
PROJECT_NAME
CLIENT_NAME
PROJECT_ADDRESS
PROJECT_NUMBER
PROJECT_ISSUE_DATE
LOAD_CASE_CATEGORY
LOAD_CASE_NUMBER
LOAD_CASE_NATURE
FAMILY_ROTATE_WITH_COMPONENT
PLAN_VIEW_VIEW_DIR
FAM_PROFILE_USAGE
FAMILY_RENDERING_TYPE
FAMILY_WORK_PLANE_BASED
FAMILY_SYMBOLIC_REP
FAMILY_USE_PRECUT_SHAPE
CURVE_PARAM_STEEL_CANTILEVER
CURVE_PARAM_CONCRETE_CANTILEVER
DIM_DISPLAY_EQ
GRIDLINE_SPEC_STATUS
PROPERTY_SEGMENT_N_S
PROPERTY_SEGMENT_BEARING
PROPERTY_SEGMENT_E_W
PROPERTY_SEGMENT_DISTANCE
SHEET_FILE_PATH
SHEET_GUIDE_GRID
SHEET_DRAWN_BY
SHEET_DATE
INSTANCE_HEAD_HEIGHT_PARAM
IMPORT_BACKGROUND
FAMILY_KEEP_TEXT_READABLE
COVER_TYPE_LENGTH
FAMILY_IS_ELEVATION_MARK_BODY
SCHEDULE_SHEET_APPEARANCE_PARAM
SCHEDULE_FORMAT_PARAM
SCHEDULE_FIELDS_PARAM
SCHEDULE_GROUP_PARAM
PG_CONSTRUCTION
WALL_ATTR_WIDTH_PARAM
FUNCTION_PARAM
WALL_STRUCTURE_ID_PARAM
WRAPPING_AT_INSERTS_PARAM
WRAPPING_AT_ENDS_PARAM
RAMP_ATTR_THICKNESS
AUTO_PANEL
AUTO_JOIN_CONDITION
CURTAIN_WALL_PANELS_CONSTRUCTION_TYPE
REVEAL_PROFILE_PARAM
WALL_SWEEP_PROFILE_PARAM
RECT_MULLION_THICK
MULLION_POSITION
MULLION_PROFILE
MULLION_CORNER_TYPE
STAIRS_RAILING_BALUSTER_IS_POST
CEILING_THICKNESS
FASCIA_PROFILE_PARAM
GUTTER_PROFILE_PARAM
SLAB_EDGE_PROFILE_PARAM
STAIRS_RAILING_HEIGHT_SHIFT_VAL
STAIRS_RAILING_RAIL_STRUCTURE
STAIRS_RAILING_BALUSTER_PLACEMENT
STAIRS_RAILING_HEIGHT_SHIFT_TYPE
STAIRS_RAILING_HEIGHT
STAIRS_RAILING_TANGENT_CONNECTION
STAIRS_RAILING_CONNECTION
STAIRS_RAILING_BALUSTER_OFFSET
STAIRS_RAILING_ANGLED_CONNECTION
STAIRS_ATTR_MONOLITHIC_STAIRS
STAIRS_ATTR_STAIR_CALCULATOR
STAIRS_ATTR_STAIRS_CUT_OFFSET
STAIRS_ATTR_STAIRS_BOTTOM
STAIRS_ATTR_LANDINGS_OVERLAPPING
HOSTFIN_PARAM_THICKNESS
TYPE_WALL_CLOSURE
REBAR_SYSTEM_COVER_BOTTOM
REBAR_SYSTEM_COVER_TOP
REBAR_SYSTEM_COVER_SIDE
FLOOR_ATTR_DEFAULT_THICKNESS_PARAM
INVALID
FASCIA_DEPTH_PARAM
ROOF_EAVE_CUT_PARAM
ACTUAL_MAX_RIDGE_HEIGHT_PARAM
ROOF_ATTR_DEFAULT_THICKNESS_PARAM
AUTO_PANEL_WALL
ALLOW_AUTO_EMBED
AUTO_JOIN_CONDITION_WALL
DOOR_FRAME_TYPE
PG_MATERIALS
MATERIAL_ID_PARAM
RAMP_ATTR_MATERIAL
MATERIAL_PARAM_COLOR
MATERIAL_PARAM_SHININESS
MATERIAL_PARAM_TRANSPARENCY
MATERIAL_PARAM_SMOOTHNESS
PHY_MATERIAL_PARAM_TYPE
MATERIAL_PARAM_GLOW
GENERIC_FINISH
INVALID
STAIRS_ATTR_BODY_MATERIAL
STAIRS_ATTR_TREAD_MATERIAL
STAIRS_ATTR_STRINGER_MATERIAL
STAIRS_ATTR_RISER_MATERIAL
HOSTFIN_PARAM_MATERIAL
PHY_MATERIAL_PARAM_EXP_COEFF3
PHY_MATERIAL_PARAM_SHEAR_MOD3
PHY_MATERIAL_PARAM_UNIT_WEIGHT
PHY_MATERIAL_PARAM_SHEAR_MOD1
PHY_MATERIAL_PARAM_POISSON_MOD1
PHY_MATERIAL_PARAM_DAMPING_RATIO
PHY_MATERIAL_PARAM_REDUCTION_FACTOR
PHY_MATERIAL_PARAM_SHEAR_MOD2
PHY_MATERIAL_PARAM_EXP_COEFF1
PHY_MATERIAL_PARAM_BEHAVIOR
PHY_MATERIAL_PARAM_YOUNG_MOD2
PHY_MATERIAL_PARAM_POISSON_MOD2
PHY_MATERIAL_PARAM_EXP_COEFF2
PHY_MATERIAL_PARAM_POISSON_MOD3
PHY_MATERIAL_PARAM_MINIMUM_TENSILE_STRENGTH
PHY_MATERIAL_PARAM_YOUNG_MOD1
PHY_MATERIAL_PARAM_MINIMUM_YIELD_STRESS
PHY_MATERIAL_PARAM_YOUNG_MOD3
DOOR_FRAME_MATERIAL
CONCEPTUAL_CONSTRUCTION_MATERIAL
PG_TITLE
TITLE_FONT
TITLE_SIZE
TITLE_STYLE_BOLD
TITLE_STYLE_UNDERLINE
TITLE_STYLE_ITALIC
PG_PATTERN_GRID_1
SPACING_LAYOUT_1
SPACING_LENGTH_1
CURTAINGRID_ADJUST_BORDER_1
PG_PATTERN_MULLION_2
AUTO_MULLION_BORDER1_GRID2
AUTO_MULLION_BORDER2_GRID2
AUTO_MULLION_INTERIOR_GRID2
PG_PATTERN_GRID_2
SPACING_LENGTH_2
CURTAINGRID_ADJUST_BORDER_2
SPACING_LAYOUT_2
PG_PATTERN_MULLION_1
AUTO_MULLION_BORDER1_GRID1
AUTO_MULLION_INTERIOR_GRID1
AUTO_MULLION_BORDER2_GRID1
PG_STAIR_RISERS
STAIRS_ATTR_RISER_TYPE
STAIRS_ATTR_RISER_THICKNESS
STAIRS_ATTR_RISER_TREAD_CONNECT
STAIRS_ATTR_LAST_RISER
STAIRS_ATTR_FIRST_RISER
STAIRS_ATTR_MAX_RISER_HEIGHT
PG_STAIR_TREADS
STAIRS_ATTR_NOSING_LENGTH
STAIRS_ATTR_TREAD_LENGTH
STAIRS_ATTR_TREAD_THICKNESS
STAIRS_ATTR_TREAD_FRONT_PROFILE
STAIRS_ATTR_NOSING_PLACEMENT
PG_STAIR_STRINGERS
STAIRS_ATTR_STRINGER_HEIGHT
STAIRS_ATTR_STRINGER_OFFSET
STAIRS_ATTR_STRINGER_THICKNESS
STAIRS_ATTR_NUM_MID_STRINGERS
STAIRS_ATTR_STRINGER_CARRIAGE
STAIRS_ATTR_LEFT_SIDE_STRINGER
STAIRS_ATTR_RIGHT_SIDE_STRINGER
STAIRS_ATTR_TRIM_TOP
STAIRS_ATTR_LANDING_CARRIAGE
PG_PATTERN
REPEATING_DETAIL_SPACING
REPEATING_DETAIL_ROTATION
REPEATING_DETAIL_LAYOUT
REPEATING_DETAIL_ELEMENT
REPEATING_DETAIL_INSIDE
PG_IFC
DOOR_OPERATION_TYPE
PG_ENERGY_ANALYSIS
GBXML_EDIT_DATA_PARAM
ZONE_CALCULATED_COOLING_LOAD_PER_AREA_PARAM
ZONE_CALCULATED_AREA_PER_COOLING_LOAD_PARAM
ZONE_CALCULATED_HEATING_LOAD_PER_AREA_PARAM
ZONE_SERVICE_TYPE_PARAM
ZONE_CALCULATED_HEATING_LOAD_PARAM
ZONE_CALCULATED_AREA_PER_HEATING_LOAD_PARAM
ZONE_COOLING_INFORMATION_PARAM
ZONE_CALCULATED_COOLING_LOAD_PARAM
ZONE_OUTDOOR_AIR_INFORMATION_PARAM
ZONE_HEATING_INFORMATION_PARAM
ZONE_COIL_BYPASS_PERCENTAGE_PARAM
SPACE_OCCUPANCY_SCHEDULE_PARAM
ROOM_DESIGN_POWER_LOAD_PER_AREA_PARAM
ROOM_PEOPLE_LATENT_HEAT_GAIN_PER_PERSON_PARAM
ROOM_AREA_PER_PERSON_PARAM
BUILDING_OPENING_TIME_PARAM
SPACE_LIGHTING_SCHEDULE_PARAM
BUILDING_UNOCCUPIED_COOLING_SET_POINT_PARAM
ROOM_PLENUM_LIGHTING_PARAM
ROOM_PEOPLE_SENSIBLE_HEAT_GAIN_PER_PERSON_PARAM
ROOM_DESIGN_LIGHTING_LOAD_PER_AREA_PARAM
BUILDING_CLOSING_TIME_PARAM
SPACE_POWER_SCHEDULE_PARAM
PG_DISPLAY
VIEW_GRAPH_SUN_PATH_SIZE
PG_ELECTRICAL_LOADS
RBS_WIRE_NEUTRAL_MULTIPLIER_PARAM
RBS_ELEC_WIRE_SHARE_NEUTRAL
RBS_WIRE_MATERIAL_PARAM
RBS_WIRE_INSULATION_PARAM
RBS_WIRE_CONDUIT_TYPE_PARAM
RBS_WIRE_TEMPERATURE_RATING_PARAM
RBS_WIRE_MAX_CONDUCTOR_SIZE_PARAM
RBS_WIRE_NEUTRAL_MODE_PARAM
RBS_ELEC_WIRE_SHARE_GROUND
RBS_WIRE_NEUTRAL_INCLUDED_IN_BALANCED_LOAD_PARAM
RBS_VOLTAGETYPE_MINVOLTAGE_PARAM
RBS_VOLTAGETYPE_MAXVOLTAGE_PARAM
RBS_VOLTAGETYPE_VOLTAGE_PARAM
RBS_DISTRIBUTIONSYS_VLL_PARAM
RBS_DISTRIBUTIONSYS_VLG_PARAM
RBS_DISTRIBUTIONSYS_PHASE_PARAM
RBS_DISTRIBUTIONSYS_CONFIG_PARAM
RBS_DISTRIBUTIONSYS_NUMWIRES_PARAM
PG_VIEW_CAMERA
VIEWER3D_RENDER_SETTINGS
VIEW_CAMERA_POSITION
VIEWER_PERSPECTIVE_DISABLED
VIEWER_EYE_ELEVATION
VIEWER_TARGET_ELEVATION
PG_STRUCTURAL
CONTINUOUS_FOOTING_STRUCTURAL_USAGE
FAMILY_STRUCT_MATERIAL_TYPE
STRUCTURAL_BEAM_CUTBACK_FOR_COLUMN
FAMILY_EXPORT_AS_GEOMETRY
INVALID
STRUCT_CONNECTION_COLUMN_BASE
STRUCT_CONNECTION_COLUMN_TOP
FRAMING_LENGTH_ROUNDOFF
STRUCTURAL_BEAM_START_ATTACHMENT_TYPE
STRUCTURAL_FRAME_CUT_LENGTH
STRUCTURAL_NUMBER_OF_STUDS
INSTANCE_STRUCT_USAGE_PARAM
STRUCTURAL_BEAM_END_ATTACHMENT_TYPE
STRUCTURAL_CAMBER
STRUCTURAL_STICK_SYMBOL_LOCATION
STRUCT_CONNECTION_BEAM_START
STRUCT_CONNECTION_BEAM_END
FLOOR_PARAM_IS_STRUCTURAL
WALL_STRUCTURAL_USAGE_PARAM
CLEAR_COVER_EXTERIOR
CLEAR_COVER_OTHER
CLEAR_COVER_INTERIOR
STRUCTURAL_ATTACHMENT_START_VALUE_ELEVATION
STRUCTURAL_ATTACHMENT_START_LEVEL_REFERENCE
STRUCTURAL_ATTACHMENT_END_LEVEL_REFERENCE
STRUCTURAL_ATTACHMENT_END_VALUE_ELEVATION
PG_STRUCTURAL_ANALYSIS
STRUCTURAL_ANALYZES_AS
STRUCTURAL_BOTTOM_RELEASE_MX
STRUCTURAL_TOP_RELEASE_TYPE
STRUCTURAL_TOP_RELEASE_FZ
STRUCTURAL_BOTTOM_RELEASE_FY
STRUCTURAL_BOTTOM_RELEASE_MZ
STRUCTURAL_BOTTOM_RELEASE_FX
STRUCTURAL_BOTTOM_RELEASE_FZ
STRUCTURAL_TOP_RELEASE_FY
STRUCTURAL_TOP_RELEASE_MZ
STRUCTURAL_BOTTOM_RELEASE_MY
STRUCTURAL_BOTTOM_RELEASE_TYPE
STRUCTURAL_TOP_RELEASE_FX
STRUCTURAL_TOP_RELEASE_MY
STRUCTURAL_TOP_RELEASE_MX
STRUCTURAL_START_RELEASE_FX
STRUCTURAL_END_RELEASE_FZ
STRUCTURAL_START_RELEASE_MY
STRUCTURAL_END_RELEASE_TYPE
STRUCTURAL_START_RELEASE_MZ
STRUCTURAL_START_RELEASE_TYPE
STRUCTURAL_END_RELEASE_FY
STRUCTURAL_START_RELEASE_FY
STRUCTURAL_END_RELEASE_FX
STRUCTURAL_START_RELEASE_MX
STRUCTURAL_END_RELEASE_MZ
STRUCTURAL_START_RELEASE_FZ
STRUCTURAL_END_RELEASE_MY
STRUCTURAL_END_RELEASE_MX
STRUCTURAL_FLOOR_ANALYZES_AS
PG_ANALYTICAL_MODEL
STRUCTURAL_ANALYTICAL_COLUMN_HORIZONTAL_PROJECTION_PLANE
STRUCTURAL_ANALYTICAL_PROJECT_MEMBER_PLANE_COLUMN_TOP
STRUCTURAL_ANALYTICAL_PROJECT_MEMBER_PLANE_COLUMN_BOTTOM
STRUCTURAL_ANALYTICAL_PROJECT_MEMBER_PLANE
STRUCTURAL_ANALYTICAL_BEAM_RIGID_LINK
STRUCTURAL_ANALYTICAL_BEAM_HORIZONTAL_PROJECTION_PLANE
STRUCTURAL_ANALYTICAL_PROJECT_FLOOR_PLANE
STRUCTURAL_ANALYTICAL_SKETCH_XY_AUTODETECT
STRUCTURAL_WALL_TOP_PROJECTION_PLANE
STRUCTURAL_ANALYTICAL_MODEL
STRUCTURAL_WALL_BOTTOM_PROJECTION_PLANE
STRUCTURAL_WALL_PROJECTION_SURFACE
PG_PATTERN_GRID_VERT
CURTAINGRID_ANGLE_VERT
SPACING_NUM_DIVISIONS_VERT
SPACING_JUSTIFICATION_VERT
CURTAINGRID_ORIGIN_VERT
SPACING_LAYOUT_VERT
CURTAINGRID_ADJUST_BORDER_VERT
SPACING_LENGTH_VERT
PG_PATTERN_GRID_HORIZ
SPACING_JUSTIFICATION_HORIZ
SPACING_NUM_DIVISIONS_HORIZ
CURTAINGRID_ORIGIN_HORIZ
CURTAINGRID_ANGLE_HORIZ
SPACING_LENGTH_HORIZ
SPACING_LAYOUT_HORIZ
CURTAINGRID_ADJUST_BORDER_HORIZ
PG_PATTERN_MULLION_HORIZ
AUTO_MULLION_BORDER1_HORIZ
AUTO_MULLION_INTERIOR_HORIZ
AUTO_MULLION_BORDER2_HORIZ
PG_PATTERN_MULLION_VERT
AUTO_MULLION_BORDER1_VERT
AUTO_MULLION_INTERIOR_VERT
AUTO_MULLION_BORDER2_VERT
PG_MECHANICAL
RBS_PIPE_ROUGHNESS_PARAM
PG_MECHANICAL_AIRFLOW
ZONE_CALCULATED_SUPPLY_AIRFLOW_PARAM
ZONE_CALCULATED_SUPPLY_AIRFLOW_PER_AREA_PARAM
If we’d like to group the Parameter instances of a particular Element, the following help methods and calling code can achieve the goal:
Element element = SelElement(cmdData.Application.ActiveUIDocument.Selection).Element;
Dictionary<BuiltInParameterGroup, List<Parameter>> groupDict = GroupParameters(element);
MessageBox.Show(string.Format("Total {0} parameters belong to {1} groups.", element.Parameters.Size, groupDict.Keys.Count));
List<Parameter> pList = ParametersInGroup(element, BuiltInParameterGroup.PG_CONSTRAINTS);
if (pList != null)
{
string info = string.Empty;
foreach (Parameter p in pList)
{
info += p.Definition.Name + Environment.NewLine;
}
MessageBox.Show(info, LabelUtils.GetLabelFor(BuiltInParameterGroup.PG_CONSTRAINTS) + " Group");
}
public static List<Parameter> ParametersInGroup(Element e, BuiltInParameterGroup g)
{
Dictionary<BuiltInParameterGroup, List<Parameter>> groupDict = GroupParameters(e);
return groupDict.Keys.Contains(g) ? groupDict[g] : null;
}
public static Dictionary<BuiltInParameterGroup, List<Parameter>> GroupParameters(Element e)
{
Dictionary<BuiltInParameterGroup, List<Parameter>> dict =
new Dictionary<BuiltInParameterGroup, List<Parameter>>();
foreach (Parameter p in e.Parameters)
{
if (!dict.ContainsKey(p.Definition.ParameterGroup))
{
dict.Add(p.Definition.ParameterGroup, new List<Parameter>());
}
dict[p.Definition.ParameterGroup].Add(p);
}
return dict;
}
public static Reference SelElement(Selection selection)
{
Reference picked = selection.PickObject(ObjectType.Element, "Please select an element");
return picked;
}
The first message box may say something like 20 parameters belong to 5 groups and the second may print out something like the following if a Wall is selected:
Parameter Grouper of RevitAddinWizard can help us group parameters automatically in no time.
Links to some related articles:
Parameter of Revit API - BuiltInParameter
Parameter Retriever of RevitAddCoder
Parameter of Revit API - Parameter Information
Parameter Infoer of RevitAddCoder
Parameter of Revit API - ParameterType And StorageType
Parameter Typer of RevitAddCoder
Parameter Grouper of RevitAddCoder
Parameter Filter of RevitAddCoder
Parameter of Revit API - Read/Write Parameter Values
Recent Comments