×
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

Customize the OPEN dialog box?

Customize the OPEN dialog box?

Customize the OPEN dialog box?

(OP)
The OPEN dialog box has a list of "shortcuts" on the left side. How can I customize that list of "shortcuts"? I'd like to add some network folders there that I use repededly to the point of absurdity. I know I can create some windows short cuts and add them to my start menu - I've done that. But I'd like to have some of these same ones available within SolidWorks.
Thanks...

RE: Customize the OPEN dialog box?

I've had the same problem, having to navigate through 15 layers of folders all day. First I created shortcuts in the my documents-folder to all the directory's I used often. But eventually I didn;t like it at all. So I've now created a macro that will give me a small window in bottom-right corner of the screen with 5 buttons on it that will open the file-open-dialog in the right directory's. I also created a small program that will write a text file with these shortcuts in it so the shortcuts are easy to modify. Until now everybody including me is very happy with this tool.

RE: Customize the OPEN dialog box?


Bouke
Could you post it here for all to see? ... If it's not too big.

from (the City of) Barrie, Ontario.

Everyone has a photographic memory. Some just don't have film.

RE: Customize the OPEN dialog box?

Just another option (although maybe not as nice as Bouke's macro):

Anytime you find yourself browsing to the same folder repeatedly, once you are there you can hit the little down arrow next to the Open button.  There you will get an option to Add to Favorites.  When you need to go there again you can hit the Favorites link on the left side of the dialog and any shortcuts added will be there.

RE: Customize the OPEN dialog box?

(OP)
That's what I've done - sort of. I was just looking for a "slicker" way to accomplish the same. Apparently a few others are too. I'm glad I asked the question.

tatej usfilter.com

RE: Customize the OPEN dialog box?

Hey Guys,

I've tried to remove all the unnessesary data from the macro and I haven't tested it so probably it won't work anymore, But you'll get the picture, also I have created a program to setup the shortcuts (shorts.exe) and this creates a macro with button-label and path in it. If someone wants the full version I could send it to you over email.

Code:

Dim swApp As Object
Dim retval As Integer
Dim pathShortcuts(10) As String
Dim labelShortcuts(10) As String
Dim dummy As Integer
Dim bool As Boolean

Sub Init()
  
  Set swApp = CreateObject("SldWorks.Application")
      swApp.Visible = True
  
  
  LaadShortcuts
    
End Sub

Sub checkdoc()
  bool = True
  Set swApp = CreateObject("SldWorks.Application")
      swApp.Visible = True
        
      Set ModelDoc = swApp.ActiveDoc
      If ModelDoc Is Nothing Then
          MsgBox ("Geen part geopend")
          bool = False
      End If
     
End Sub

Sub LaadShortcuts()
  On Error GoTo Error
  Close #1
  Open "C:\winnt\SWShortcuts.txt" For Input As #1
  
  dummy = 1
  While (dummy < 6)
    
    Input #1, labelShortcuts(dummy)
    If (Left(labelShortcuts(dummy), 1) <> "/") Then
      Input #1, pathShortcuts(dummy)
      If (Left(pathShortcuts(dummy), 1) <> "/" And labelShortcuts(dummy) <> "/") Then dummy = dummy + 1
    End If
     
  Wend
  
  SetShortcuts

  
  On Error GoTo 0
  

GoTo skip
Error: shorts
skip:
End Sub

Sub SetShortcuts()
   Shortcut1.Caption = labelShortcuts(1)
   Shortcut2.Caption = labelShortcuts(2)
   Shortcut3.Caption = labelShortcuts(3)
   Shortcut4.Caption = labelShortcuts(4)
   Shortcut5.Caption = labelShortcuts(5)

End Sub

Sub shorts()
 
   Shell "M:\Solidworks\SW Tools\IMS tools\shorts.exe", vbNormalFocus
   End
   
End Sub

 
Private Sub Shortcut1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
   
   If (Button = 1) Then
   
     On Error GoTo Error
     Dim args As String
     If (Mid(pathShortcuts(1), 2, 1) = ":") Then
        args = ""
        retval = swApp.SetCurrentWorkingDirectory(pathShortcuts(1))
        retval = swApp.Command(swFileOpen, args)
     End If
     GoTo skip
   End If
   If (Button = 2) Then
      On Error GoTo Error
      If (Mid(pathShortcuts(1), 2, 1) = ":") Then
         opdracht = "explorer " + pathShortcuts(1)
         Shell opdracht, vbNormalFocus
      End If
      GoTo skip
   End If

Error:    MsgBox ("Deze functie werkt alleen in solidworks 2004")
skip:
   On Error GoTo 0
   
End Sub




Grtz, Bouke

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