CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE

CAD tip CAD tip # 8441:

Question

CAD 
 %  platform  category 
A
If you need to suppress (hide, disable) display of sketch simensions in the Inventor Sketch environment, you can use the following simple VBA macro. Insert it in the active document (or template) in the VBA Editor.

You can run it with Alt+F8 or add it to your ribbon (see):

Sub ToggleDims()
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
oDoc.ComponentDefinition.Sketches(1).DimensionsVisible = Not oDoc.ComponentDefinition.Sketches(1).DimensionsVisible
End Sub
or an alternative macro which can be stored anywhere:
Sub ToggleDims2()
    Dim oSketch As PlanarSketch
    On Error Resume Next
        Set oSketch = ThisApplication.ActiveEditObject
        If Err.Number <> 0 Then Exit Sub
    On Error GoTo 0
    oSketch.DimensionsVisible = Not oSketch.DimensionsVisible
    ThisApplication.ActiveView.Update
End Sub

Outside the Sketch environment just right click on the sketch in the browser and set Dimension visibility.

Inv2012Inv2011Inv2010
100% *CAD
27.1.2012   25863×  
   
this tip shared by ARKANCE experts applies to: Inventor 2012 · Inventor 2011 · Inventor 2010 ·

See also:
Tip 14527:Search/Replace texts in Inventor drawings - iLogic.
Tip 14098:How to use arc length parameter in Inventor sketch?
Tip 14059:Import coordinates from CSV files into Fusion profiles.
Tip 12856:How to force Inventor holes in existing points only?
Tip 12046:Random shape and appearance of an Inventor part or assembly.


Back    All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  





Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist