Add parameter initialization within Import Init.py and enhance the understand

of the parameters behavior into the UI
This commit is contained in:
Jean-Marie Verdun
2017-07-23 20:56:28 -07:00
committed by Yorik van Havre
parent c4be890f47
commit 91a505ebd8
2 changed files with 15 additions and 2 deletions

View File

@@ -32,3 +32,16 @@
#FreeCAD.addExportType("STEP 214 (*.step *.stp)","ImportGui")
#FreeCAD.addExportType("IGES files (*.iges *.igs)","ImportGui")
FreeCAD.addImportType("PLMXML files (*.plmxml)","PlmXmlParser")
# Add initial parameters value if they are not set
paramGetV = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Import/hSTEP")
ReadShapeCompoundMode_status=paramGetV.GetBool("ReadShapeCompoundMode")
if not ReadShapeCompoundMode_status:
paramGetV.SetBool("ReadShapeCompoundMode",False)
Scheme_203_status=paramGetV.GetBool("Scheme_214")
if not Scheme_203_status:
paramGetV.SetBool("Scheme_203",False)
Scheme_214_status=paramGetV.GetBool("Scheme_214")
if not Scheme_214_status:
paramGetV.SetBool("Scheme_214",True)