Not tried setting it with API however from your link above:
"In addition to applying built-in tile patterns to a divided surface, you can create your own massing panel families using the "Curtain Panel Pattern Based.rft" template. These panel families can then be loaded into massing families and applied to divided surfaces using the DividedSurface.ChangeTypeId() method."
I was using this one:
Metric Generic Model Pattern Based.rft
However sounds like you can also use this one:
Metric Curtain Panel Pattern Based.rft
The fun of family templates: not being able to convert one to another and finding out halfway through the day you are using the wrong one.
You need a pattern based family that is compatible with one of the built-in patterns e.g. below I have a 4 point adaptive component and that is compatible with 'Triangle (bent)' amongst others.
Are you having problems setting it via DividedSurface.ChangeTypeId (in the massing family), that would be my first go at it. If that doesn't work try setting it to the equivalent built-in pattern first perhaps (although it should not be required). I think you can set in the project if you have a parameter for that in the massing family.



Failure could also be due to the surface divisions leading to bad component geometrical configuration (it would usually handle that in failures processing by asking to delete the bad adaptive component instances). So see what works in terms of divisions, spacing etc. in the UI and then use that in API.