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

Ribbon Tab bug

Hi, i'm having an issue with the ribbon tab.

When i execute this code from an assembly, to unfold all sheetmetal parts, the main assembly ribbon tab turns in a sheetmetal ribbon tab.

Sub createFlatPattern(doc As PartDocument)
    Dim metaldef As SheetMetalComponentDefinition
    Set metaldef = doc.ComponentDefinition
    If Not metaldef.HasFlatPattern Then
        metaldef.Unfold
        metaldef.FlatPattern.ExitEdit
    End If
End Sub

gustavocassel_0-1669750050447.png

As you can see, i'm currently in a assembly document and the sheetmetal ribbon tab is active.

I want a way to fix it, please.