Get user preferences

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Marc Bassini
Posts: 135
Joined: Fri Aug 13, 2021 10:08 am

Get user preferences

Post by Marc Bassini »

Hi!
How can I get the default directory for templates from a macro ?
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Get user preferences

Post by openBrain »

Hi

Code: Select all

FreeCAD.ConfigGet('AppHomePath')+'Mod/TechDraw/Templates/'
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Get user preferences

Post by Roy_043 »

Code: Select all

prm = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/TechDraw/Files")
str = prm.GetString("TemplateDir", FreeCAD.ConfigGet("AppHomePath") + "Mod/TechDraw/Templates")
Post Reply