The writable
property returns whether or not this dataref can be written to, as a bool.
Note: even if a dataref is marked writable, it may not act writable. This can happen for datarefs that X-Plane writes to on every frame of simulation. In some cases, the dataref is writable but you have to set a separate “override” dataref to 1 to stop X-Plane from writing it.
> dataref = "laminar/c172/fuel/fuel_tank_selector"
Dataref
> dataref.writable
false