TechDraw PageDefault/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "Narzędzie Wstaw nową domyślna stronę rysunku może być używane w makrodefinicjach i z konsoli Python za pomocą następujących funkcji:")
(Created page with "* Tworzy nową stronę w bieżącym dokumencie")
Line 76: Line 76:
page.Template = FreeCAD.ActiveDocument.Template
page.Template = FreeCAD.ActiveDocument.Template
}}
}}
* Tworzy nową stronę w bieżącym dokumencie
* Creates a new Page in the current document


===Pola tekstowe do edycji===
===Pola tekstowe do edycji===

Revision as of 08:10, 11 December 2022

TechDraw PageDefault

Menu location
Rysunek Techniczny → Wstaw nową domyślna stronę rysunku
Workbenches
Rysunek Techniczny
Default shortcut
None
Introduced in version
-
See also
Wstaw nową domyślna stronę rysunku, Szablony

Opis

Narzędzie Wstaw nową domyślna stronę rysunku tworzy nowy obiekt Strony używając pliku szablonu określonego w Ustawieniach dla środowiska pracy Rysunek Techniczny.

Domyślny szablon dołączony do środowiska pracy Rysunek Techniczny: Strona A4 w orientacji poziomej, z edytowalnymi polami tekstowymi

Użycie

Uwagi

  • 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 with the Redraw Page tool. 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

Właściwości

Data

Podstawowe

  • DANEProjection Type: Default projection type (First or Third Angle) for this Page.

Strona

  • DANEKeep Updated: If false, the Page is not updated with changes to the 3D model. Useful for complicated/slow drawings. See Notes.
  • DANETemplate: A link to this Page's Template object.
  • DANEViews: A list of links to the Views on this Page.
  • DANEScale: Default scale for Views in this Page.
  • DANENext Balloon Index: Auto-numbering for Balloons.

Widok

Siatka

Tworzenie skryptów

Zobacz również stronę: Dokumentacja API generowana automatycznie oraz Podstawy pisania skryptów dla FreeCAD.

Narzędzie Wstaw nową domyślna stronę rysunku może być używane w makrodefinicjach i z konsoli Python za pomocą następujących funkcji:

page = FreeCAD.ActiveDocument.addObject('TechDraw::DrawPage','Page')
template = FreeCAD.ActiveDocument.addObject('TechDraw::DrawSVGTemplate','Template')
template.Template = templateFileSpec
page.Template = FreeCAD.ActiveDocument.Template
  • Tworzy nową stronę w bieżącym dokumencie

Pola tekstowe do edycji

See also: TechDraw Templates for more information on creating templates.

Once a new page has been created, its Template attribute holds an EditableTexts dictionary with the name of the editable fields (keys) and their textual values. Copy this dictionary to a variable, make changes, and then re-assign the dictionary to the EditableTexts attribute to see the changes.

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