Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customize the OPEN dialog box? 1

Status
Not open for further replies.

TateJ

Mechanical
Mar 15, 2002
789
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...
 
Replies continue below

Recommended for you

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.
 

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

[cheers] from (the City of) Barrie, Ontario.

[lol] Everyone has a photographic memory. Some just don't have film. [lol]
 
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.
 
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 [idea] usfilter.com
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor