You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I tried a solidworks macros from code stack about quick view option to view solidworks assembly directly from file explorer .....please let me know if there are some specific system or software specifications for this macros.
Or any changes I have to make in script....I did everything...but it's not working.
This was on codestack
The following guide explains how to enable Quick View mode directly from the Windows File Explorer.
Create new folder which will contain the script to open the file in Quick View mode
Create a text file with an extension of .vbs and name it opener.vbs
Paste the following code into this file
Dim swApp
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible = True
Dim filePath
filePath = WScript.Arguments.Item(0)
If filePath <> "" then
Dim docSpec
Set docSpec = swApp.GetOpenDocSpec(filePath)
docSpec.ViewOnly = True
Dim swModel
Set swModel = swApp.OpenDoc7(docSpec)
If swModel is Nothing Then
MsgBox "Failed to open document"
End If
Else
MsgBox "File path is not specified"
End If
Create another text file and name it install.cmd
Add the following line into the install.cmd which will enable a Quick Mode for assemblies
Save both files. It is important to keep those files in the same folder
Run install.cmd. You might need to run this as an administrator
As the result the Quick View context menu command is added to the Windows File Explorer. Select any assembly and click right mouse button. Click Quick View and the file will be opened in the quick view mode in SOLIDWORKS.
The text was updated successfully, but these errors were encountered:
Hello
I tried a solidworks macros from code stack about quick view option to view solidworks assembly directly from file explorer .....please let me know if there are some specific system or software specifications for this macros.
Or any changes I have to make in script....I did everything...but it's not working.
This was on codestack
The following guide explains how to enable Quick View mode directly from the Windows File Explorer.
Create new folder which will contain the script to open the file in Quick View mode
Create a text file with an extension of .vbs and name it opener.vbs
Paste the following code into this file
THE CODE:
'**********************
'Copyright(C) 2024 Xarial Pty Limited
'Reference: https://www.codestack.net/solidworks-api/getting-started/scripts/vbscript/open-quick-view/
'License: https://www.codestack.net/license/
'**********************
Dim swApp
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible = True
Dim filePath
filePath = WScript.Arguments.Item(0)
If filePath <> "" then
Else
MsgBox "File path is not specified"
End If
Create another text file and name it install.cmd
Add the following line into the install.cmd which will enable a Quick Mode for assemblies
Code:
reg add "HKCR\SldAssem.Document\shell\Quick View\command" /ve /d "wscript.exe """%~dp0opener.vbs""" ""%%1""" /f
Save both files. It is important to keep those files in the same folder
Run install.cmd. You might need to run this as an administrator
As the result the Quick View context menu command is added to the Windows File Explorer. Select any assembly and click right mouse button. Click Quick View and the file will be opened in the quick view mode in SOLIDWORKS.
The text was updated successfully, but these errors were encountered: