Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from processing.core.Processing import Processing
- from processing.gui.AlgorithmDialog import AlgorithmDialog
- def runAlgorithm(alg):
- """ Borrowed from CommanderWindow.py, from Processing framework """
- alg = alg.getCopy()
- message = alg.checkBeforeOpeningParametersDialog()
- if message:
- print message
- return
- dlg = alg.getCustomParametersDialog()
- if not dlg:
- dlg = AlgorithmDialog(alg)
- canvas = iface.mapCanvas()
- prevMapTool = canvas.mapTool()
- dlg.show()
- dlg.exec_()
- if canvas.mapTool() != prevMapTool:
- try:
- canvas.mapTool().reset()
- except:
- pass
- canvas.setMapTool(prevMapTool)
- alg = Processing.getAlgorithm("qgis:joinattributestable") # Adjust this to your needs
- if alg is not None:
- runAlgorithm(alg)
- import processing
- processing.alglist()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement