Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
revans1234
686 Views, 3 Replies

VBA sheet metal face not working- wrong side of sketch

Hello, this problem is making no sense so I wonder if anyone else has met it.

 

In the attachment there are 3 tabs.

 

The code to make the closed loop tab shape is the same in each case.

 

The tab on the orange side has been made into a face using the VBA face feature "add" used as in the demo code. Here is an extract in my code.

 

    Dim oFaceFeatureDefinition As FaceFeatureDefinition
    Set oFaceFeatureDefinition = oSheetMetalFeatures.FaceFeatures.CreateFaceFeatureDefinition(Prof)
   
    ' Create a face feature.
    Dim oFaceFeature As FaceFeature
    Set oFaceFeature = oSheetMetalFeatures.FaceFeatures.ADD(oFaceFeatureDefinition)

 

Prof is the closed loop tab shape.

 

The tab on the flange edge vertical in the picture has been done the same way, but the face is clearly not correct.

 

The lowest tab has been made into a face manually using the ribbon face command. It is correct.

 

I am trying to find out why.

 

I have tried-

-drawing the profile the other way round.

-AddForSurface instead of AddForSolid- does not work- this is only for surfaces

-Drawing my sketch on the other face of the flange (the inside face)- still got an incorrect face, but now on the other face.

 

Has anyone any ideas? If you use the VBA face feature successfully on flanges, how do you do it?

 

Thanks and regards,

 

Roger.