After digging through some older threads and testing things, I found that this approach works — based on the discussion here:
https://developers.maxon.net/forum/topic/13555/python-how-to-get-axis-scale-from-the-preference-settings/2
import c4d
doc: c4d.documents.BaseDocument # The currently active document.
op: c4d.BaseObject | None # The primary selected object in `doc`. Can be `None`.
def main() -> None:
# get preferences
pref = c4d.plugins.FindPlugin(465001632)
# Memory ((465001628, 1, 465001632), (888, 133, 465001632))
desc = c4d.DescID(
c4d.DescLevel(465001628, 1, 465001632),
c4d.DescLevel(888, 133, 465001632)
)
memoryPref = pref[desc]
memoryPref[c4d.PREF_MEMORY_PVHARDFOLDER] = "c:\\blubb"
c4d.EventAdd()
if __name__ == '__main__':
main()
To discover all available IDs inside a preference node, you can list them like this:
for bc, descid, _ in pref.GetDescription(0):
name = bc[c4d.DESC_NAME]
print(name,descid)
So this topic is solved 


