×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

DIMENSION JOG
2

DIMENSION JOG

DIMENSION JOG

(OP)
I'm trying to find a different way to access the dimension jog other than RMB DIM -> DISPLAY OPTIONS -> JOG/UNJOG.

When trying to tidy up a drawing with hundreds of dims, the process mentioned above takes about 4 secs, not to mention too many mouse clicks.

I haven't come across a jog command button, keyboard shortcut or macro to help shorten this procedure.  Any help would be appreciated.
thanks!

RE: DIMENSION JOG

If you are trying to add the ability to jog dimensions, you could box-select all of them then do the RMB thing. This will allow every dimension to be jogged manually.

cheers

RE: DIMENSION JOG

(OP)
Thanks C.

The problem then is when zooming out to get a bird's eye view of what needs to be changed and multi-selecting each individual dimension is that I generally lose my ability to select accurately, thus causing other problems.

I've sent this as an enhancement request, but I'm sure it isn't at the top of the list.

Thanks for the feedback.  Congrats on Tip King of the Week.

RE: DIMENSION JOG

That's why I mentioned doing a box selection of ALL the dimensions. The ones that are already jogged will remain jogged, but the ones that weren't jogged will become joggable.

... and thanks for the congrats.

cheers

RE: DIMENSION JOG

2
Here's a macro you can map to a keyboard shortcut.  To use it, select an ordinate dimension and run the macro.  It will toggle the jog state of the dimension.  It currently only works for one dimension at a time.  As posted it will notify the user with a message box if the selection set is inappropriate (more than one item selected, selection is not a dimension, dimension is not ordinate).  If you don't want to see the notification, change the value of NOTIFY_ERRORS to "False".

Let me know if you want to be able to run this on multiple preselected dims.

CODE

Const NOTIFY_ERRORS As Boolean = True

Dim swApp As SldWorks.SldWorks
Dim swDoc As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swDim As SldWorks.Dimension
Dim swDispDim As SldWorks.DisplayDimension

Sub JoggleToggle()
Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc
Set swSelMgr = swDoc.SelectionManager

If swSelMgr.GetSelectedObjectCount <> 1 Then
    If NOTIFY_ERRORS Then MsgBox "Select a single dimension and run again"
    Exit Sub
ElseIf swSelMgr.GetSelectedObjectType3(1, Empty) <> swSelDIMENSIONS Then
    If NOTIFY_ERRORS Then MsgBox "Select one dimension and run again"
    Exit Sub
End If

Set swDispDim = swSelMgr.GetSelectedObject6(1, Empty)
If swDispDim.GetType <> swOrdinateDimension Then
    If NOTIFY_ERRORS Then MsgBox "Dimension was not ordinate"
    Exit Sub
End If

If swDispDim.Jogged Then
    swDispDim.Jogged = False
Else
    swDispDim.Jogged = True
End If
swDoc.ClearSelection2 True
swDoc.GraphicsRedraw2
End Sub

RE: DIMENSION JOG

(OP)
SSSSSWEEEET.  That is exactly what I needed.  Mapped to the handy "J" key and off I go.  That's great.

If you have one already for a multi-select, I'll be glad to put it in the arsenal.  "K" is sounding good about now.  Otherwise, no worries.  This first one should meet most of my needs.
Thanks a bunch.  Been a great help.

RE: DIMENSION JOG

I went ahead and wrote the multi-select version.  It's actually a bit shorter.  Any inappropriate selections will simply be ignored.  Enjoy!

CODE

Dim swDoc As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swDispDim As SldWorks.DisplayDimension
Dim i As Long

Sub JoggleToggleMulti()
Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc
Set swSelMgr = swDoc.SelectionManager

For i = 1 To swSelMgr.GetSelectedObjectCount
    If swSelMgr.GetSelectedObjectType3(i, Empty) = swSelDIMENSIONS Then
        Set swDispDim = swSelMgr.GetSelectedObject6(i, Empty)
        If swDispDim.GetType = swOrdinateDimension Then
            If swDispDim.Jogged Then
                swDispDim.Jogged = False
            Else
                swDispDim.Jogged = True
            End If
        End If
    End If
Next
swDoc.ClearSelection2 True
swDoc.GraphicsRedraw2
End Sub

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources