- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So, here I am working happily along... until... I try to get parameters from certain elements.
I started erroring out with code that had worked previously in other circumstances and got to digging around and I believe that I have found a "Missing" BuiltInParameter.
I found this one while examining Material PropertySetElements.
Here is the ID: -1140313
Here it is in the context of an output text file:
Definition IS Built-in: -1140314 : Concrete compression : autodesk.revit.parameter:phyMaterialParamConcreteCompression-1.0.0
Forge Data Type: autodesk.spec.aec.structural:stress-2.0.0
Is Spec : True
Spec Display Name: Stress
Is Measurable Spec? : True
Forge Unit Type ID : autodesk.unit.unit:kipsPerSquareInch-1.0.1
Unit Display Name: Kips per square inch
Definition Group: -5000105 : PG_MATERIALS : Materials and Finishes
Is User Visible: True
Can Vary in Groups: False
Built-in Param: -1140314 : PHY_MATERIAL_PARAM_CONCRETE_COMPRESSION : Concrete compression
Is Read Only? : False
Is User Modifiable? : False
Double Value: 7355327.080352
Value String: 3.50 ksi
!! Cannot retrieve Parameter: -1140313
Definition IS Built-in: -1140312 : Thermal expansion coefficient Z : autodesk.revit.parameter:phyMaterialParamExpCoeff3-1.0.0
Forge Data Type: autodesk.spec.aec.structural:thermalExpansionCoefficient-2.0.0
Is Spec : True
Spec Display Name: Thermal Expansion Coefficient
Is Measurable Spec? : True
Forge Unit Type ID : autodesk.unit.unit:inverseDegreesFahrenheit-1.0.1
Unit Display Name: Inverse degrees Fahrenheit
Definition Group: -5000105 : PG_MATERIALS : Materials and Finishes
Is User Visible: True
Can Vary in Groups: False
Built-in Param: -1140312 : PHY_MATERIAL_PARAM_EXP_COEFF3 : Thermal expansion coefficient Z
Is Read Only? : False
Is User Modifiable? : False
Double Value: 1E-05
Value String: 0.00001 1/°F
And here is a clip from a text file created by a function that gets all BuiltInParameters by iterating the Enumeration:
-1140315 Enum Name: PHY_MATERIAL_PARAM_BENDING_REINFORCEMENT
- Display Name: Bending reinforcement
- Storage Type: Double
-1140314 Enum Name: PHY_MATERIAL_PARAM_CONCRETE_COMPRESSION
- Display Name: Concrete compression
- Storage Type: Double
-1140312 Enum Name: PHY_MATERIAL_PARAM_EXP_COEFF3
- Display Name: Thermal expansion coefficient Z
- Storage Type: Double
-1140311 Enum Name: PHY_MATERIAL_PARAM_EXP_COEFF2
- Display Name: Thermal expansion coefficient Y
- Storage Type: Double
-1140310 Enum Name: PHY_MATERIAL_PARAM_EXP_COEFF1
- Display Name: Thermal expansion coefficient X
- Storage Type: Double
notice the "missing" BIP between ...12 and ...14, the very one that is attached to the property set that I was trying to examine
Created the above BIP list using:
For Each item As RDB.BuiltInParameter In [Enum].GetValues(GetType(RDB.BuiltInParameter))...
I tried reversing the Enum (using GetNames then parsing for the value but no luck there either).
Anything that tries to look up anything about that parameter will fail (LabelUtils, TypeOfStroage, Internal definition, etc.)
It simply doesn't exist, yet it does and causes my code to error out any time that I run across it.
Along the way I found other BIPs that could not be looked up via LabelUtils or TypeOfStorage or trying to get the InternalDefinition:
-1152999 Enum Name: STRUCTURAL_CONNECTION_SYMBOL
-1151605 Enum Name: STAIRS_LANDINGTYPE_TREADRISER_TYPE
-1114354 Enum Name: SPACE_PEOPLE_ACTIVITY_LEVEL_PARAM
-1114137 Enum Name: RBS_DUCT_FITTING_LOSS_TABLE_PARAM
-1013353 Enum Name: SPACING_JUSTIFICATION
-1005364 Enum Name: VIEW_SOLARSTUDY_LIGHTING_PRESET_INDEX
-1005363 Enum Name: VIEW_SOLARSTUDY_MULTIDAY_PRESET_INDEX
-1005362 Enum Name: VIEW_SOLARSTU-1005361 Enum Name: VIEW_SOLARSTUDY_STILL_PRESET_INDEX
DY_SINGLEDAY_PRESET_INDEX
-1002102 Enum Name: SURFACE_PATTERN_ID_PARAM
Use caution folks, you never know what you're going to run into 🙂
-G
GaryOrrMBI (MBI Companies 2014-Current)
aka (past user names):
Gary_J_Orr (GOMO Stuff 2008-2014);
OrrG (Forum Studio 2005-2008);
Gary J. Orr (LHB Inc 2002-2005);
Orr, Gary J. (Gossen Livingston 1997-2002)
Solved! Go to Solution.