your problem was not the creation of the HoleData, but the way you created the Hole.
When creating the Hole manually, I recognized that it is not possible to set the From plane, but only the To plane. SE considers the plane of the hole profile to be the From plane. so that I changed your code to create two coincident planes on the From and To faces and used these to create the hole profile and passed them to the AddFromTo method.
The attached code for the Form should work.
BTW: You should also create an object of type Missing to pass as an unused optional method argument, instead of null.
Posted by: Martin Bernhard Post date: 8/21/2007 5:27:38 AM