TechDraw: Pagina predefinita

From FreeCAD Documentation
Revision as of 20:33, 6 April 2020 by Renatorivo (talk | contribs) (Created page with "{{GuiCommand/it |Name=TechDraw PageDefault |Name/it=Nuovo disegno standard |MenuLocation=TechDraw → Nuovo disegno standard |Workbenches=TechDraw |SeeA...")

Nuovo disegno standard

Posizione nel menu
TechDraw → Nuovo disegno standard
Ambiente
TechDraw
Avvio veloce
Nessuno
Introdotto nella versione
-
Vedere anche
Nuovo disegno da modello, Modelli di squadrature

Descrizione

The New Default tool creates a new Page object using the the template file specified in the TechDraw Preferences.

Modello predefinito fornito con TechDraw: pagina A4 con orientamento orizzontale, con i campi di testo modificabili

Utilizzo

Note

  • If a Page is marked as "do not keep updated" either through the KeepUpdated Property or by the setting in Preferences, it will ignore changes in the 3D model. You may notice anomalies (missing geometry, missing Dimension values, etc) in the appearance of the Page. These will correct themselves once the Page is updated. The Page will have this icon in the tree while updating is suspended. This setting also affects the startup process. If the Page is marked "do not keep updated" it will not be drawn at program start.

If the default template is not specified in your user configuration file user.cfg, the tool will try

$INSTALL_DIR/Mod/TechDraw/Templates/A4_LandscapeTD.svg

Where $INSTALL_DIR is the directory where FreeCAD was installed, for example

/usr/share/freecad/Mod/TechDraw/Templates/A4_LandscapeTD.svg

Proprietà

  • DatiProjection Type: Default projection type (First or Third Angle) for this Page.
  • DatiKeep Updated: If false, Page is not updated with changes to the 3D model. Useful for complicated/slow drawings. See Notes.
  • DatiTemplate: A link to this Page's Template object.
  • DatiViews: A list of links to the Views on this Page.
  • DatiScale: Default scale for Views in this Page.

Script

Vedere anche: API TechDraw e Nozioni di base sugli script di FreeCAD.

The New Default tool can be used in macros and from the Python console by using the following functions:

page = FreeCAD.ActiveDocument.addObject('TechDraw::DrawPage','Page')
template = FreeCAD.ActiveDocument.addObject('TechDraw::DrawSVGTemplate','Template')
template.Template = templateFileSpec
page.Template = FreeCAD.ActiveDocument.Template
  • Crea una nuova pagina nel documento corrente

Campi di testo modificabili

Per ulteriori informazioni sulla creazione di modelli vedere anche: Modelli di squadrature.

Una volta creata una nuova pagina, il suo attributo Template contiene un dizionario EditableTexts con il nome dei campi modificabili (chiavi) e i loro valori testuali. Copiare questo dizionario in una variabile, apportare le modifiche, quindi riassegnare il dizionario all'attributo EditableTexts per vedere le modifiche.

page = FreeCAD.ActiveDocument.Page
texts = page.Template.EditableTexts

for key, value in texts.items():
    print("{0} = {1}".format(key, value))

texts["FC-Title"] = "The title of my page"
page.Template.EditableTexts = texts