Macro Alias Manager: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 10: Line 10:
* create a "part family", that's it, create different files for each column in a range. It will add to the original name a suffix based on first row (1)
* create a "part family", that's it, create different files for each column in a range. It will add to the original name a suffix based on first row (1)


More information might be found on [FreeCAD forums|http://forum.freecadweb.org/].
More information might be found on FreeCAD forums: http://forum.freecadweb.org/
And most updated versions of the macro can be downloaded from GitHub
And most updated versions of the macro can be downloaded from GitHub: https://github.com/pgilfernandez/FreeCAD_AliasManager


[[Image:aliasmanager_screenshot.png]]
[[Image:aliasmanager_screenshot.png]]

Revision as of 08:46, 6 December 2016

File:Text-x-python Alias Manager

Description
This macro helps managing aliases inside FreeCAD Spreadsheet workbench. It is able to create, delete, move aliases and create a 'part family' group of files.

Macro version: 1.0
Author: pablogil & tahari
Author
pablogil & tahari
Download
None
Links
Macro Version
1.0
Date last modified
None
FreeCAD Version(s)
None
Default shortcut
None
See also
None

This macro helps managing aliases inside FreeCAD Spreadsheet workbench. It is able to:

  • create aliases based on first column (A column)
  • delete aliases placed on a column
  • move aliases from one column to another one
  • create a "part family", that's it, create different files for each column in a range. It will add to the original name a suffix based on first row (1)

More information might be found on FreeCAD forums: http://forum.freecadweb.org/ And most updated versions of the macro can be downloaded from GitHub: https://github.com/pgilfernandez/FreeCAD_AliasManager

How to use

- pending -

Limitations

- pending -

The script

# ============================================================================================================
# ============================================================================================================
# ==                                                                                                        ==
# ==                                           alias Manager                                                ==
# ==                                                                                                        ==
# ============================================================================================================
# ============================================================================================================
# ABOUT
# ============================================================================================================
# version v1.0
# Macro developed for FreeCAD (http://www.freecadweb.org/).
# This macro helps managing aliases inside FreeCAD Spreadsheet workbench. It is able to:
#        - create aliases based on first column (A column)
#        - delete aliases placed on a column
#        - move aliases from one column to other one
#        - create a "part family", that's it, create different files for each column in a range. It will add
#          to the original name a suffix based on first row (1)
# More information might be found on FreeCAD forums: http://forum.freecadweb.org/
#
#
# LICENSE
# ============================================================================================================
# Original work done by tarihatari (https://github.com/tarihatari/FreeCAD_Macros)
# Improved by Pablo Gil Fernandez
#
# Copyright (c) 2016 tarihatari & Pablo Gil Fernandez
#
# This work is licensed under GNU Lesser General Public License (LGPL).
# To view a copy of this license, visit https://www.gnu.org/licenses/lgpl-3.0.html.
#
# ============================================================================================================
__title__   = "alias manager"
__author__  = "Pablo Gil Fernandez"
__version__ = "01.00"
__date__    = "20/11/2016"
 
__Comment__ = "This macro helps managing aliases inside FreeCAD Spreadsheet workbench. It is able to create, delete, move aliases and create a 'part family' group of files"
 
__Wiki__ = "https://github.com/pgilfernandez/FreeCAD_AliasManager"
__Help__ = "https://github.com/pgilfernandez/FreeCAD_AliasManager"
__Status__ = "stable"
__Requires__ = "FreeCAD 0.16"

from PySide import QtGui, QtCore
from FreeCAD import Gui
import os
import string
App = FreeCAD
Gui = FreeCADGui

# ========================================================
# ===== Info popup window ================================
# ========================================================
class infoPopup(QtGui.QDialog):
    def __init__(self, parent=None):
        self.dialog = None
        self.dialog = QtGui.QDialog()
        self.dialog.resize(360,400)
        self.dialog.setWindowTitle("About...")

        info = QtGui.QTextEdit("<h2>INFORMATION</h2><hr><br>This macro helps managing aliases inside FreeCAD Spreadsheet workbench. It is able to create, delete, move aliases and create a 'part family' group of files.<br><h2>USAGE</h2><hr><ul><li><b>set aliases</b>: based on first column (A column), it will create aliases for the range given. If an alias is already set for any other cell the command won't work, it will be needed to clear them before setting them again.</li><li><b>Clear aliases</b>: it will clear all aliases inside the given range of cells (only one column).</li><li><b>Move aliases</b>: it will clear and set aliases <b>from</b> a given column <b>to</b> a new one.</li><li><b>Generate part family</b>: it will create different files for each column in a range. It will add to the original name a suffix based on first row. If an alias is already set for any other cell the command won't work, it will be needed to clear them before running the command.</li></ul><h2>LICENCE</h2><hr>Original work done by <b>tarihatari</b> (<a href='https://github.com/tarihatari/FreeCAD_Macros'>https://github.com/tarihatari/FreeCAD_Macros</a>)<br>Improved by <b>Pablo Gil Fernandez</b><br><br>Copyright (c) 2016 tarihatari & Pablo Gil Fernandez<br><br>This work is licensed under GNU Lesser General Public License (LGPL).<br>To view a copy of this license, visit <a href='https://www.gnu.org/licenses/lgpl-3.0.html'>https://www.gnu.org/licenses/lgpl-3.0.html</a>.<br>")
        info.setReadOnly(True)
        info.setAlignment(QtCore.Qt.AlignLeft
Other languages: