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

VBA code to unflag "USE THICKNESS FROM RULE"

I need a VBA code to unflag the "Use Thickness from Rule" in the sheet metal style property.

I tried the "ThisDoc.Document.ComponentDefinition.UseSheetMetalStyleThickness = False" but give me a debug error.

 

Also the following code:

Sub ChangeUseThicknessFromRule()
  Dim doc As PartDocument
  Set doc = ThisApplication.ActiveDocument
  
  Dim cd As SheetMetalComponentDefinition
  Set cd = doc.ComponentDefinition
  
  cd.UseSheetMetalStyleThickness = False
End Sub

 Not sure where is the error.

Thanks,

Nicola