Error handling if NumPy is not there
This commit is contained in:
parent
396f188f30
commit
015183a0d7
|
@ -42,7 +42,10 @@ class PartDesignWorkbench ( Workbench ):
|
||||||
from WizardShaft import WizardShaft
|
from WizardShaft import WizardShaft
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "Wizard shaft module cannot be loaded"
|
print "Wizard shaft module cannot be loaded"
|
||||||
from FeatureHole import HoleGui
|
try:
|
||||||
|
from FeatureHole import HoleGui
|
||||||
|
except:
|
||||||
|
pass
|
||||||
import PartDesignGui
|
import PartDesignGui
|
||||||
import PartDesign
|
import PartDesign
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -36,13 +36,14 @@ class PartDesignWorkbench ( Workbench ):
|
||||||
self.__class__.MenuText = "Part Design"
|
self.__class__.MenuText = "Part Design"
|
||||||
self.__class__.ToolTip = "Part Design workbench"
|
self.__class__.ToolTip = "Part Design workbench"
|
||||||
|
|
||||||
<<<<<<< 64a1a440055b8a4359349b7abffe8956e78196db
|
<<<<<<< ae478b98ed61389183af93a610e1a07448918eb5
|
||||||
def Initialize(self):
|
def Initialize(self):
|
||||||
# load the module
|
# load the module
|
||||||
try:
|
try:
|
||||||
from WizardShaft import WizardShaft
|
from WizardShaft import WizardShaft
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "Wizard shaft module cannot be loaded"
|
print "Wizard shaft module cannot be loaded"
|
||||||
|
from FeatureHole import HoleGui
|
||||||
import PartDesignGui
|
import PartDesignGui
|
||||||
import PartDesign
|
import PartDesign
|
||||||
try:
|
try:
|
||||||
|
@ -58,7 +59,10 @@ class PartDesignWorkbench ( Workbench ):
|
||||||
from WizardShaft import WizardShaft
|
from WizardShaft import WizardShaft
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "Wizard shaft module cannot be loaded"
|
print "Wizard shaft module cannot be loaded"
|
||||||
from FeatureHole import HoleGui
|
try:
|
||||||
|
from FeatureHole import HoleGui
|
||||||
|
except:
|
||||||
|
pass
|
||||||
import PartDesignGui
|
import PartDesignGui
|
||||||
import PartDesign
|
import PartDesign
|
||||||
try:
|
try:
|
||||||
|
@ -67,6 +71,6 @@ class PartDesignWorkbench ( Workbench ):
|
||||||
print "Involute gear module cannot be loaded"
|
print "Involute gear module cannot be loaded"
|
||||||
def GetClassName(self):
|
def GetClassName(self):
|
||||||
return "PartDesignGui::Workbench"
|
return "PartDesignGui::Workbench"
|
||||||
>>>>>>> Python code of Hole Feature
|
>>>>>>> Error handling if NumPy is not there
|
||||||
|
|
||||||
Gui.addWorkbench(PartDesignWorkbench())
|
Gui.addWorkbench(PartDesignWorkbench())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user