Create event in specific calendar?

Hello, is there a way to specify the calendar to create an event in?
So far I’ve tried this:

let c = new Calendar.defaultForEvents()
let ce = new CalendarEvent([c])

ce.title = "This is a test"

…and it creates a calendar event in the default “Family” calendar. I also tried specifying the calendar title (ce.c.title = “TestCalendarName”), and it just renames the “Family” calendar to “TestCalendarName”.

I think it has something to do with the identifier.

Can anyone help?

Use forEvents to get all the event calendars, then find the matching object based on matching the title.

Interesting (to me). I have been experimenting with manually taking an Omnifocus task and turning it into an entry in a special “time blocking” calendar, using Fantastical.

If this idea sticks I could use this capability to automate some of the time blocking.