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...
Thanks...






RE: Customize the OPEN dialog box?
RE: Customize the OPEN dialog box?
Bouke
Could you post it here for all to see? ... If it's not too big.
RE: Customize the OPEN dialog box?
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?
RE: Customize the OPEN dialog box?
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
RE: Customize the OPEN dialog box?
Henry