- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have created a metal sheet file and the code that you have created works, it does not show any error. Could you attach your example here to investigate?
Sub ChangeUseThicknessFromRule() Dim doc As PartDocument Set doc = ThisApplication.ActiveDocument Dim cd As SheetMetalComponentDefinition Set cd = doc.ComponentDefinition cd.UseSheetMetalStyleThickness = False End Sub
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I was trying to use the code on an old derived sheet metal part, and it didn't work.
But it works perfectly on new parts.
I'm guessing the problem was just that.
Thanks anyway for your fast reply,
Nicola