# SldwrksExporter Script to generate production files (part -> step, dxf, pdf) # Usage: 1. Download the latest release: https://git.lurenaud.com/lurenaud/SldwrksExporter/releases 2. Unzip and run the export.exe file 3. Select the folder with the parts, to generate the production files 4. Open and wait It works faster with solidworks closed # Working from source: ## Prerequisite: - python (to install type python in terminal, it will open the windows store to install it) (or: `curl -o python.exe https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe; python.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0`) - git (install: `winget install --id Git.Git -e --source winget`) ## Automatic install will dowwnload the git repo, install everything and launch the program. copy paste this line in an **Administrator** powershell or windows terminal `curl -o installFrom0.cmd https://git.lurenaud.com/lurenaud/SldwrksExporter/raw/branch/main/scripts/installFrom0.cmd; .\installFrom0.cmd` ## Manual install 1. Get the code: - `git clone https://git.lurenaud.com/lurenaud/SldwrksExporter.git` 2. Setup python env - create venv `python -m venv .venv` - activate environement `.venv\Script\Activate.ps1` - install requirements `pip install -r requirements.txt` ## Common problems: - Cannot activate venv, script : in an admin terminal run `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned` ## Use: In terminal: `.\gui.py path\toFloderOfFiles` will generate step, pdf and dxf in a export folder Double click the gui.py file ## Generate exe file Using auto-py-to-exe `pip install auto-py-to-exe` Export command, will generate the exe file in the output folder ``` pyinstaller --noconfirm --onefile --console --add-data "C:/Users/lucienrenaud/Desktop/SldwrksExporter/scripts/export-pdf-dxf.ps1;." --add-data "C:/Users/lucienrenaud/Desktop/SldwrksExporter/scripts/export-step.ps1;." --add-data "C:/Users/lucienrenaud/Desktop/SldwrksExporter/scripts/SolidWorks.Interop.sldworks.dll;." "C:/Users/lucienrenaud/Desktop/SldwrksExporter/scripts/export.py" ```