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

Issue with FlatBendResults Object

Raider_71
Collaborator

Issue with FlatBendResults Object

Raider_71
Collaborator
Collaborator

Hi everyone,

I have come across an issue with the FlatBendResults object in a specific case. In general, the results are good but when used with a bend that was "split" with let's say a cut in the folded model, then the results seem to be incorrect.

I cant seem to be able to get the Start and End points/vertices of some of the bend lines.

 

To keep the explanation simple I have attached a part file for reference.

 

The code below will insert a Work Point at each endpoint of the bend lines. If you run this you will see what I mean. Is this a known bug or am I missing something here?

 

Open the part and activate the Flat Pattern. Then run the code. Check the points created in the Flat Pattern environment.

 

    Private Sub BtnAddWorkPoints_Click(sender As Object, e As EventArgs) Handles BtnAddWorkPoints.Click
        Try
            oApp = Marshal.GetActiveObject("Inventor.Application")
        Catch ex As Exception
            MessageBox.Show("Could not connect to Inventor.")
            Exit Sub
        End Try

        Dim oTransGeom As TransientGeometry
        oTransGeom = oApp.TransientGeometry

        Dim oPartDoc As PartDocument = oApp.ActiveDocument

        Dim oSmCompdef As SheetMetalComponentDefinition = oPartDoc.ComponentDefinition

        Dim oFlat As FlatPattern = oSmCompdef.FlatPattern

        Dim oTopFace As Face = oFlat.TopFace

        If oFlat.FlatBendResults.Count > 0 Then
            For i As Integer = 1 To oFlat.FlatBendResults.Count
                oFlat.WorkPoints.AddFixed(oFlat.FlatBendResults.Item(i).Edge.StartVertex.Point)
                oFlat.WorkPoints.AddFixed(oFlat.FlatBendResults.Item(i).Edge.StopVertex.Point)
            Next i
        End If
    End Sub

 

Any help would be appreciated!

 

Cheers

0 Likes
Reply
Accepted solutions (1)
547 Views
7 Replies
Replies (7)

YuhanZhang
Autodesk
Autodesk

This is reproducible issue and I logged it as INVGEN-67251.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes

Raider_71
Collaborator
Collaborator

Thank you!

0 Likes

YuhanZhang
Autodesk
Autodesk
Accepted solution

@Raider_71 I just remembered that we made a fix for this issue in Inventor 2021 already, your data was created with an older Inventor so you can see that problem, if you now upgrade to Inventor 2021 or later versions, you can see the fix. Please note that for the legacy data you should delete the Flat Pattern and re-generate it in newer Inventor, only migrate the legacy data could not make the issue disappear.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes

Raider_71
Collaborator
Collaborator

I will check on this but I am sure that I created a new part using Inventor 2023. Let me check and get back to you ok.

0 Likes

Raider_71
Collaborator
Collaborator

Hi, ok I see what you mean. I think I may have created or used an old file and even opening it in 2023, it still provided the incorrect result.

Now if I delete and recreate the flat pattern then it works as it should.

Also creating a new file in 2023, it works!

 

Thanks for your help!

0 Likes

JMGunnar
Collaborator
Collaborator

Is there Notch in Bendlines EndPoint? 

@Raider_71 

Johan  

 

 

0 Likes

Raider_71
Collaborator
Collaborator

Hi @JMGunnar 

 

There are no notches in the sample part no. We have developed an application to insert either Circular or V-Notches. The issue was that we could not get the correct endpoints of the bend lines if the file or flat pattern was created with Inventor 2020 or before.

 

But this seems to be solved since Inventor 2021 and our app is working just fine now.