OK - it took me quite a while, but this answer gave me a clue:
Activity drop down list not displaying activites
The issue was that the value of filter was set to null. I used the API explorer to compare an activity I could see:
{
"id": 123,
"option_group_id": 2,
"label": "My Visible Activity",
"value": "50",
"name": "My Visible Activity",
"grouping": null,
"filter": 0, //Note that filter is set to 0
"is_default": false,
"weight": 81,
...
}
with one I could not see:
{
"id": 1234,
"option_group_id": 2,
"label": "My Invisible Activity",
"value": "50",
"name": "My Invisible Activity",
"grouping": null,
"filter": null, //note that filter is set to NULL
"is_default": false,
"weight": 81,
...
}
I then used an API call to update the the value of 'filter' to 0 and it appeared correctly in the dropdown list.
To update an activity you have created and make it visible, here is an example using CV, but you can of course use the API Explorer to do the same thing:
Get the values of the exisitng activity types:
cv api4 OptionValue.get '{"where":[["option_group_id","=",2]],"limit":500}'
This will give you a list of all your activity types and the various values defined.
Update the value of the Activity Type by setting the value of 'filter' to 0:
cv api4 OptionValue.update '{"values":{"filter":0},"where":[["option_group_id","=",2], ["id","=",1234]]}'
This will now show up when you wish to add the custom field set for a particular activity type.
What I do not understand is why Activity Types I have created in the past have a filter value set correctly, but more recent ones do not. There is not an obvious way within the UI to enable or disable the visibility of individual Activity Types?