Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
thao.q.nguyen
108 Views, 1 Reply

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

 

WCrihfield
in reply to: thao.q.nguyen

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

EESignature

(Not an Autodesk Employee)