From 322830c79ed940f31b89c1153b5f694f8ed8fa64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Bra=C3=B1a?= Date: Tue, 11 Mar 2025 21:18:47 +0100 Subject: [PATCH] =?UTF-8?q?primera=20versi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Export/ExporterCommands.py | 78 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Export/ExporterCommands.py diff --git a/Export/ExporterCommands.py b/Export/ExporterCommands.py new file mode 100644 index 0000000..fc4e3a9 --- /dev/null +++ b/Export/ExporterCommands.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +# *************************************************************************** +# * * +# * Copyright (c) 2017 - Amritpal Singh * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program 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 Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** + +__title__ = "RebarCommands" +__author__ = "Amritpal Singh" +__url__ = "https://www.freecadweb.org" + +from pathlib import Path + +import FreeCADGui, FreeCAD +from PySide import QtGui, QtCore +from PySide.QtCore import QT_TRANSLATE_NOOP +from PVPlantResources import DirIcons as DirIcons +import os + + +class CommandExportToPVSyst: + "Export to PVSyst" + @staticmethod + def GetResources(): + return {'Pixmap': str(os.path.join(DirIcons, "PVsyst.png")), + 'Accel': "E, P", + 'MenuText': QT_TRANSLATE_NOOP("Outputs", "Export to PVSyst"), + 'ToolTip': QT_TRANSLATE_NOOP("Outputs", "Exportar a PVSyst")} + + @staticmethod + def Activated(): + from Export import exportPVSyst + taskd = exportPVSyst.PVSystTaskPanel() + # taskd.show() + FreeCADGui.Control.showDialog(taskd) + + @staticmethod + def IsActive(): + if FreeCAD.ActiveDocument: + return True + else: + return False + +if FreeCAD.GuiUp: + from Export import PVPlantBOQMechanical, PVPlantBOQElectrical, PVPlantBOQCivil + from Export import exportDXF, exportKMZ + FreeCADGui.addCommand('BOQMechanical', PVPlantBOQMechanical.CommandBOQMechanical()) + FreeCADGui.addCommand('BOQElectrical', PVPlantBOQElectrical.CommandBOQElectrical()) + FreeCADGui.addCommand('BOQCivil', PVPlantBOQCivil.CommandBOQCivil()) + FreeCADGui.addCommand('exportDXF', exportDXF.CommandExportDXF()) + FreeCADGui.addCommand('exportToPVSyst', CommandExportToPVSyst()) + FreeCADGui.addCommand('exportKMZ', exportKMZ.CommandExportKMZ()) + +Exportlist = ["BOQCivil", + "BOQMechanical", + "BOQElectrical", + "Separator", + "exportDXF", + # "importDXF", + "exportToPVSyst", + "exportKMZ", + ] \ No newline at end of file