Rysunek Techniczny: Wstaw nową domyślną stronę rysunku

From FreeCAD Documentation
Revision as of 08:12, 11 December 2022 by Kaktus (talk | contribs) (Created page with "Po utworzeniu nowej strony, jej atrybut {{incode|Template}} przechowuje słownik {{incode|EditableTexts}} zawierający nazwy edytowalnych pól ''(klucze)'' i ich wartości tek...")

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

Zobacz również: Rysunek Techniczny: Szablony aby uzyskać więcej informacji na temat tworzenia szablonów.

Po utworzeniu nowej strony, jej atrybut Template przechowuje słownik EditableTexts zawierający nazwy edytowalnych pól (klucze) i ich wartości tekstowe. Skopiuj ten słownik do zmiennej, wprowadź zmiany, a następnie ponownie przypisz słownik do atrybutu EditableTexts, aby zobaczyć zmiany.

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