put all STEP export/import options into one tab page
This commit is contained in:
@@ -546,16 +546,12 @@ private:
|
||||
|
||||
Base::FileInfo file(Utf8Name.c_str());
|
||||
if (file.hasExtension("stp") || file.hasExtension("step")) {
|
||||
//Interface_Static::SetCVal("write.step.schema", "AP214IS");
|
||||
bool optionScheme_214;
|
||||
bool optionScheme_203;
|
||||
ParameterGrp::handle hGrp_stp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Import/hSTEP");
|
||||
optionScheme_214 = hGrp_stp->GetBool("Scheme_214",true);
|
||||
optionScheme_203 = hGrp_stp->GetBool("Scheme_203",false);
|
||||
if (optionScheme_214)
|
||||
Interface_Static::SetCVal("write.step.schema", "AP214IS");
|
||||
if (optionScheme_203)
|
||||
ParameterGrp::handle hGrp_stp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Part/STEP");
|
||||
std::string scheme = hGrp_stp->GetASCII("Scheme", "AP214IS");
|
||||
if (scheme == "AP203")
|
||||
Interface_Static::SetCVal("write.step.schema", "AP203");
|
||||
else if (scheme == "AP214IS")
|
||||
Interface_Static::SetCVal("write.step.schema", "AP214IS");
|
||||
|
||||
STEPCAFControl_Writer writer;
|
||||
Interface_Static::SetIVal("write.step.assembly",1);
|
||||
|
||||
@@ -40,9 +40,3 @@ FreeCAD.addExportType("STEPZ zip File Type (*.stpZ *.stpz)","stepZ")
|
||||
paramGetV = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Import/hSTEP")
|
||||
if paramGetV.GetBool("ReadShapeCompoundMode", False) != paramGetV.GetBool("ReadShapeCompoundMode", True):
|
||||
paramGetV.SetBool("ReadShapeCompoundMode", True)
|
||||
|
||||
if paramGetV.GetBool("Scheme_203", False) != paramGetV.GetBool("Scheme_203", True):
|
||||
paramGetV.SetBool("Scheme_203", False)
|
||||
|
||||
if paramGetV.GetBool("Scheme_214", False) != paramGetV.GetBool("Scheme_214", True):
|
||||
paramGetV.SetBool("Scheme_214", True)
|
||||
|
||||
@@ -68,5 +68,6 @@ class ImportWorkbench ( Workbench ):
|
||||
|
||||
Gui.addWorkbench("Import",ImportWorkbench())
|
||||
"""
|
||||
import Import_rc
|
||||
FreeCADGui.addPreferencePage(":/ui/preferences-import.ui","Import-Export")
|
||||
# See https://forum.freecadweb.org/viewtopic.php?f=3&t=26782
|
||||
#import Import_rc
|
||||
#FreeCADGui.addPreferencePage(":/ui/preferences-import.ui","Import-Export")
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<cstring>Scheme_203</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Part/hSTEP</cstring>
|
||||
<cstring>Mod/Import/hSTEP</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user