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

Minor error in the code in previous post. Tried to edit, but could not find an edit button for the post, so here is the correction.

Dim oDoc As AssemblyDocument = ThisDoc.Document
Dim oAsmDef As AssemblyComponentDefinition = oDoc.ComponentDefinition
Dim oConstrs As AssemblyConstraints = oAsmDef.Constraints

For Each oConstr As AssemblyConstraint In oConstrs
    If oConstr.OccurrenceOne.Suppressed = True Or oConstr.OccurrenceTwo.Suppressed = True Then
        oConstr.Suppressed = True
    Else
        oConstr.Suppressed = False
    End If
Next