Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"""
/***************************************************************************
Name : Label DXF 3D
Description : popola il campo OGR_STYLE per label DXF 3D
Date : 11 - aprile - 2016
copyright : (C) 2016 by Salvatore Fiandaca
email : pigrecoinfinito@gmail.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
"""
from qgis.core import *
from qgis.gui import *
@qgsfunction(args='auto', group='Custom')
def label_dxf_3d(campo, feature, parent):
a = 'LABEL(f:,s:3000pt ,t:'
b = str(campo)
c = ')'
return a + b + c
@pigreco

This comment has been minimized.

Copy link
Owner Author

commented Apr 11, 2016

il file 'etichette_3D_dxf.py' è una semplice funzione (label_3d_dxf) scritta in python da poter utilizzare nel calcolatore di campi di QGIS, basti mettere il file in C:\Users\nome_utente.qgis2\python\expressions
al riavvio di QGIS troverete la nuova funzione sotto 'custom' (vedi immagini).

immagine 9
immagine 7
immagine 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.