Thursday 19 June 2014

Edit shaft generator sketches

    I don't like to use shaft generator but some people do and at times I need to edit them. Most likely I need to add tolerances and I like them to stick to the model instead of dropping them on drawing dimensions.
    In the shaft generator you can't add tolerances, by some weird logic Inventor doesn't allow you to.

    Some are available if you edit the shaft and turn the visibility of the main sketch on. You can then right click on dimensions and choose dimension properties. Then you can call them on the drawing with retrieve model dimensions.

    The shaft sketches are locked and can only be editable from within the parent assembly via Edit using Design Accelerator. If you lost that assembly or promoted/demoted components than the shaft becomes locked.

    You can unlock it with a bit of visual basic code.

    1. Open the shaft part
    2. Select the main sketch under first Revolve.
    3. Open Visual Basic Editor with Alt+F11 or go to Tools/VBA Editor.

    4. Expand "Document.Project(Shaft.ipt)" (or whatever your filename).
    5. Paste the following in the "Module1" under your file
Public Sub Func1()
ThisApplication.ActiveDocument.SelectSet(1).DisabledActionTypes = 0
End Sub

    6. Run macro by pressing on F5 or up in the menu under Run.
    7. Close VBA Editor and edit the sketch.

    Now you can add tolerances, or change geometry in any mode. I would use AutoContraints to connect end points and geometry firs.


No comments:

Post a Comment