For some more breadcrumbs; once you have a project you need to obtain an instance of the GlobalProps resource.
Consider Ignition Extensions to get easier access to the local project. Note that it's no more 'supported' whether you're using Ignition Extensions or directly accessing the SDK. Do not contact our support department if you're doing something in here and it fails.
For my actual recommendation: just encode this in a project library constant or something. Is the default database going to change all that often, really?