From 0b83260eba247c65fcd3fef4b6963ff21461f8fb Mon Sep 17 00:00:00 2001 From: Joey Strandnes Date: Mon, 8 Sep 2025 14:43:24 +0200 Subject: [PATCH] Copies the threads to the newest version of Fusion360 Simple PS script to copy the custom threads to the latest version of Fusion360. --- CopyThreads.ps1 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 CopyThreads.ps1 diff --git a/CopyThreads.ps1 b/CopyThreads.ps1 new file mode 100644 index 0000000..ea0c00b --- /dev/null +++ b/CopyThreads.ps1 @@ -0,0 +1,16 @@ +#Simple script to copy the custom threads to the most recent Fusion 360 directory. + +$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path +$FileDir = Join-Path $ScriptDir 'PGConduitThreads.xml' + +$FusionDir = Join-Path $env:LOCALAPPDATA 'Autodesk\webdeploy\production\' + +#Find the most recent version of Fusion360 +$LatestSubdir = Get-ChildItem -Path $FusionDir -Directory -ErrorAction Stop | + Sort-Object LastWriteTime -Descending | + Select-Object -First 1 + + +$ThreadPath = Join-Path $LatestSubdir.FullName 'Fusion\Server\Fusion\Configuration\ThreadData' + +Copy-Item -Path $FileDir -Destination $ThreadPath -Force \ No newline at end of file