Fix weird behaviour for 64-bit version on Windows

This commit is contained in:
wmayer 2013-07-02 14:52:32 +02:00
parent fc2fb55042
commit 8c6f77bb2b
2 changed files with 10 additions and 2 deletions

View File

@ -803,8 +803,8 @@ Document::readObjects(Base::XMLReader& reader)
reader.addName(name.c_str(), obj->getNameInDocument());
}
}
catch (Base::Exception&) {
Base::Console().Message("Cannot create object '%s'\n", name.c_str());
catch (const Base::Exception& e) {
Base::Console().Error("Cannot create object '%s': (%s)\n", name.c_str(), e.what());
}
}
reader.readEndElement("Objects");

View File

@ -51,3 +51,11 @@ FreeCAD.addImportType("IGES format (*.iges *.igs)","Part")
FreeCAD.addExportType("IGES format (*.iges *.igs)","Part")
FreeCAD.addImportType("STEP with colors (*.step *.stp)","ImportGui")
FreeCAD.addExportType("STEP with colors (*.step *.stp)","ImportGui")
# weird behaviour as 64-bit application on Windows:
# some modules like Sketcher doesn't load if Part is not loaded before with this error:
# DLL load failed: The specified procedure could not be found
import platform
if platform.architecture()[0] == '64bit' and platform.system() == 'Windows':
import Part