10-18-2023
09:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-18-2023
09:19 AM
Inventor Drawing; Toggle hide dimension while in active sketch
I have seen some post that you can use VBA with this code to hide/unhide dimension but it seems it doesn't work on the inventor 2024 version.
Dim oDoc As PartDocument oDoc = ThisApplication.ActiveDocument oDoc.ComponentDefinition.Sketches(1).DimensionsVisible = Not oDoc.ComponentDefinition.Sketches(1).DimensionsVisible
10-18-2023
09:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-18-2023
09:38 AM
Hi @thao.q.nguyen. That specific 3 lines of code might not work in VBA, because it is missing the 'Set' keyword in front of the second line, but it should work in an iLogic rule. Even in Inventor 2024 version the PlanarSketch.DimensionsVisible property is still present, and still a Read/Write Boolean. I just tested it from an iLogic rule and it worked just fine. However, if the Sketch object itself is not visible, the dimensions will not be visible either. So, you may have to make the sketch itself visible first.
Wesley Crihfield
(Not an Autodesk Employee)