I believe Kent is correct, but you might be able to eliminate the guess work though if you use the following AutoLISP functions which allow you to move away from needing to dig through the DXF code groups:
- getpropertyvalue
- setpropertyvalue
- dumpallproperties
The above functions take Dimension Overrides into consideration and will return that value rather than the base dimension style when they are applied.
DUMPALLPROPERTIES returns a list of the properties that apply to a specific entity.
Begin dumping object (class: AcDbRotatedDimension)
...
Dimgap (type: double) (LocalName: Text offset) = 0.090000
Dimjust (type: DimHorizontalTextPosEnum) (LocalName: Text pos hor) = 0
Dimldrblk (type: AcDbObjectId) = 0
Dimlfac (type: double) (LocalName: Dim scale linear) = 1.000000
Dimlim (type: bool) = 0
Dimltex1 (type: AcDbObjectId) (LocalName: Ext line 1 linetype) = 2a235140
Dimltex2 (type: AcDbObjectId) (LocalName: Ext line 2 linetype) = 2a235140
Dimltype (type: AcDbObjectId) (LocalName: Dim line linetype) = 2a235140
...
End object dump
When you have the property name and the entity, you can then get or set the property value.
(setq ent (car (entsel)))
(getpropertyvalue ent "Dimlfac")
Using the GETPROPERTYVALUE and SETPROPERTYVALUE functions are much easier than sifting through DXF code values, habits are hard to break even I gravitate to DXF codes yet, and using those functions does require less code in the end. The functions were introduced back in AutoCAD 2011, so they have been around for a while unless you need to support AutoCAD 2010 or earlier then you would need to continue using the DXF code values directly.
Best of luck finishing your code.