Default template is never the default

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Default template is never the default

Post by tigermm »

Maybe it's something I've done, but the default template when I add a job in Path is always <none>, despite me having set it to my saved template (which I even named default) :lol:

How can I get it to be "default" by default, instead of <none> and me forgetting to select something cause I'm too busy adding bodies, and having to go and add the job again?

Many thanks.
default1.jpg
default1.jpg (254.85 KiB) Viewed 1608 times
default2.jpg
default2.jpg (282.18 KiB) Viewed 1608 times
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/New Zealand (en_NZ)
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Default template is never the default

Post by sliptonic »

Interesting. I just tested with a current linux build and everything works.
Can someone else on a windows build please test to confirm?

OS: Linux Mint 20 (i3/i3)
Word size of FreeCAD: 64-bit
Version: 0.20.25306 +3 (Git)
Build type: Unknown
Branch: (HEAD detached at upstream/pr/4933)
Hash: 965ebb4a9508a07e70e65501deecaa310b5adae3
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Default template is never the default

Post by GeneFC »

I see the same as the OP.

My template is in the list, but the top item is <none>. If there is no user action then <none> will prevail.

OS: Windows 7 SP 1 (6.1)
Word size of FreeCAD: 64-bit
Version: 0.20.25288 (Git)
Build type: Release
Branch: master
Hash: bbb557aab6129efd9486d6df19f06c2976fdb7e5
Python version: 3.8.10
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)

Gene
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Re: Default template is never the default

Post by tigermm »

Good to know I'm not the only one :)

I see that some of you guys have release 0.20, would like to try it but I can't find it anywhere.

Is it a version I'd need to build?

EDIT:
Found it here with more searching https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds
But I have no idea which version to use
FreeCAD_0.20.25306_Win-LPv12.5.4_vc17.x-x86-64.7z
or
FreeCAD_weekly-builds-25220-Win-Conda_vc14.x-x86_64.7z

What's the difference?
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Default template is never the default

Post by GeneFC »

The development versions are located at

https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds

They are all fully compiled, but compressed. Just unpack with 7-zip.

Run FreeCAD.exe found in the bin folder.

No installation necessary (or possible). The existing configuration files will be used. If you want to be ultra-safe and allow a smooth return to the older versions you can copy and save your existing system.cfg and user.cfg found in

C:\\Users\#####\AppData\Roaming\FreeCAD

(##### represents your Windows login id)

Gene
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Default template is never the default

Post by GeneFC »

tigermm wrote: Sat Jul 24, 2021 1:46 am
But I have no idea which version to use
FreeCAD_0.20.25306_Win-LPv12.5.4_vc17.x-x86-64.7z
or
FreeCAD_weekly-builds-25220-Win-Conda_vc14.x-x86_64.7z

What's the difference?
The core FreeCAD code is almost the same, with the 5-digit number showing the exact version. The big difference is in the supporting libraries. The first version above is a "lib-pack" version based on the various libraries (OCC, python, QT, etc.) that are needed to run the FreeCAD code.

The second version is compiled using the Conda platform (look it up if you care) and some libraries have different versions than the lib-pack choices. Both work in almost all cases. The Conda version also includes a lot of extras, such as Assembly 3.

I usually pick the simpler lib-pack version if the version numbers are close, but I use either one to get the newest. For example commit 25306 was a Path commit, and it is not in 25220. May or may not be important for any given project.

Gene
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Default template is never the default

Post by sliptonic »

Once you've set the default template in Path Preferences (and restarted), Please paste this into the Python console and report the results

Code: Select all

import PathScripts.PathPreferences as pp
pp.defaultJobTemplate()
Syres
Veteran
Posts: 2898
Joined: Thu Aug 09, 2018 11:14 am

Re: Default template is never the default

Post by Syres »

In my case:

Code: Select all

'E:\\Data\\FreeCAD\\Extras\\job_JPS.json'
OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of FreeCAD: 64-bit
Version: 0.20.25306 (Git)
Build type: Release
Branch: master
Hash: 5f5b3d9b67136edda1f6738f1a83154990f7839d
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United Kingdom (en_GB)
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Default template is never the default

Post by GeneFC »

Here are the results from that experiment.

Python report:

Code: Select all

'C:/Users/zzzzzz/AppData/Roaming/FreeCAD/Macro/job_testtemplate.json'
Upon creating a job for a model that has never previously had a job.

Capture1.jpg
Capture1.jpg (25.49 KiB) Viewed 1399 times

Upon expanding the drop-down.

Capture2.jpg
Capture2.jpg (35.22 KiB) Viewed 1399 times

The template is there and is available, but it is not the default.

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of FreeCAD: 64-bit
Version: 0.20.25306 (Git)
Build type: Release
Branch: master
Hash: 5f5b3d9b67136edda1f6738f1a83154990f7839d
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Russ4262
Posts: 951
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Default template is never the default

Post by Russ4262 »

Afternoon.
Confirmed. PR #4939, [Path] Fix multi-OS path issue for Job templates, in cue.

Russell

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.25310 (Git)
Build type: Release
Branch: Master_a40812
Hash: a40812dfbfeaadf31aa2b2f30216b11f1556f86b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Post Reply