Counterbore hole

 

Hello all,

 

I am not abble to create counterbore hole while regular hole is OK.

Did anybody ever do countebore hole in C# or C++? And could you tell me how to define

it?

 

I am using:

 

      SolidEdgePart.HoleData holeData =

        partDoc.HoleDataCollection.Add(

        SolidEdgePart.FeaturePropertyConstants.igCounterboreHole,

//        SolidEdgePart.FeaturePropertyConstants.igRegularHole,

        0.010,

        0.02,

        0.005,

        null,

        null,

        null,

        null,

        null,

        null,

        null,

        null,

        null,

        null,

        null,

        SolidEdgePart.FeaturePropertyConstants.igCounterboreProfileIsAtTop,

        null,

        null,

        null,

        null);

 

 

when I use Regular hole instead of Counterbore everything is OK (line 158 in Form1.cs).

 

Please find attache short testing project in C# and model.

 

I tried all hole types - throughAll, fromTo, ... but without success.

 

Thanks,

 

Jara

 

Posted by: Jara Ctverak
Post date: 8/13/2007 9:36:44 PM

1 REPLY

RE: Counterbore hole

 

Jara,

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.

HTH,

Martin

 

 

Posted by: Martin Bernhard
Post date: 8/21/2007 5:27:38 AM