2013-06-17 14:56:45 +00:00
# -*- coding: utf-8 -*-
2014-02-20 16:25:37 +04:00
# Copyright (C) 2006-2014 EDF R&D
2012-12-13 11:41:29 +00:00
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
2014-02-20 16:25:37 +04:00
# version 2.1 of the License, or (at your option) any later version.
2012-12-13 11:41:29 +00:00
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
# if you already have plugins defined in a salome_plugins.py file, add this file at the end.
# if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
def YamsLct ( context ) :
# get context study, studyId, salomeGui
study = context . study
studyId = context . studyId
sg = context . sg
import os
import subprocess
import tempfile
from PyQt4 import QtCore
from PyQt4 import QtGui
from PyQt4 . QtGui import QFileDialog
from PyQt4 . QtGui import QMessageBox
2013-06-17 14:56:45 +00:00
#prior test to avoid unnecessary user GUI work with ending crash
2012-12-13 11:41:29 +00:00
try :
os . environ [ ' DISTENE_LICENCE_FILE_FOR_YAMS ' ]
except :
2013-06-17 14:56:45 +00:00
QMessageBox . warning ( None , " Products " , " Distene ' s product Yams is not installed. \n required environment variable: \n DISTENE_LICENCE_FILE_FOR_YAMS= ' /.../dlim8.var.sh ' " )
2012-12-13 11:41:29 +00:00
return
import monYamsPlugDialog
2013-06-17 14:56:45 +00:00
window = monYamsPlugDialog . getDialog ( )
2012-12-13 11:41:29 +00:00
window . show ( )