Draft AnnotationStyleEditor/de: Difference between revisions
(Created page with "Die Anmerkungsstile werden als serialisierte Wörterbücher im {{incode|Meta}} Attribut des Dokuments gespeichert. Dieses Attribut wird vom Anmerkungsstileditor überprüft, w...") |
|||
Line 27: | Line 27: | ||
== Skripten == |
== Skripten == |
||
Die Anmerkungsstile werden als serialisierte Wörterbücher im {{incode|Meta}} Attribut des Dokuments gespeichert. Dieses Attribut wird vom Anmerkungsstileditor überprüft, wenn er geöffnet wird. |
|||
The annotation styles are saved as serialized dictionaries in the {{incode|Meta}} attribute of the document. This attribute is inspected by the annotation style editor when it is opened. |
|||
{{Code|code= |
{{Code|code= |
Revision as of 22:23, 14 October 2020
Entwurf AnmerkungsStilEditor |
Menüeintrag |
---|
Anmerkung → Anmerkungsstile |
Arbeitsbereich |
Entwurf |
Standardtastenkürzel |
- |
Eingeführt in Version |
0.19 |
Siehe auch |
Entwurf Text, Entwurf Abmessung, Entwurf Beschriftung |
Beschreibung
Das Anmeldungsstileditor Werkzeug ermöglicht es dir, Stile zu definieren, die die visuellen Eigenschaften von anmerkungsähnlichen Objekten beeinflussen, wie z.B. Text, Abmessung, und Beschriftung.
File:Draft AnnotationStyleEditor example.png
Stileditor zur Konfiguration der Anmerkungen.
Anwendung
- Drücke Entwurf Anmerkungsstileditor Taste.
- Öffne das Combofeld, und dann wähle Neu hinzufügen... um einen neuen Stil zu definieren, oder wähle einen der vorhandenen Stile aus.
- Stelle die Eigenschaften des Stils ein und drücke dann Template:Taste, wenn du zufrieden bist.
Verwende Umbenenne oder Löschen um den aktiven Stil umzubenennen oder zu löschen.
Skripten
Die Anmerkungsstile werden als serialisierte Wörterbücher im Meta
Attribut des Dokuments gespeichert. Dieses Attribut wird vom Anmerkungsstileditor überprüft, wenn er geöffnet wird.
>>> print(App.ActiveDocument.Meta["Draft_Style_Lane 1:100"])
{"FontName": "DejaVu Sans", "FontSize": "8.0000 ", "LineSpacing": "1 cm", "ScaleMultiplier": 1.0, "ShowUnit": false, "UnitOverride": "", "Decimals": 2, "ShowLines": true, "LineWidth": 2, "LineColor": 1095216660480, "ArrowType": 0, "ArrowSize": "5.0000 ", "DimensionOvershoot": "1.0000 ", "ExtensionLines": "5.0000 ", "ExtensionOvershoot": "1.0000 "}
Each style that appears in the editor is internally saved with the style name prefixed by Draft_Style_
; this will prevent name clashes with other keys that may be saved in Meta
, which can hold arbitrary information.
You may define any new style by adding the necessary information to a key that starts with Draft_Style_
. The corresponding value of this key must be a dictionary serialized using json
.
import json
meta = App.ActiveDocument.Meta
props = {"LineWidth": 6, "ArrowSize": "7"}
meta["Draft_Style_Thick_lines"] = json.dumps(props)
App.ActiveDocument.Meta = meta
The values not entered will be filled automatically when this style is selected in the style editor.
In a similar way, any serialized dictionary can be unpacked for edition.
meta = App.ActiveDocument.Meta
new_dict = json.loads(meta["Draft_Style_Thick_lines"])
Because the graphical interface widgets check the units of the input values, many of these values must be saved as strings, rather than floating point numbers.
Strings:
props = {
"FontName": "DejaVu Sans",
"FontSize": "12.0000 ",
"LineSpacing": "1 cm",
"UnitOverride": "m",
"ArrowSize": "5.0000 ",
"DimensionOvershoot": "1.0000 ",
"ExtensionLines": "5.0000 ",
"ExtensionOvershoot": "1.0000 "
}
Numbers:
props = {
"ScaleMultiplier": 1.0,
"Decimals": 2,
"LineWidth": 1,
"LineColor": 1095216660480,
"ArrowType": 0
}
The line color corresponds to the 32-bit integer, from which the individual RGBA values can be extracted.
Boolean:
props = {
"ShowUnit": False,
"ShowLines": True
}
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
- Erste Schritte
- Installation: Herunterladen, Windows, Linux, Mac, Zusätzlicher Komponenten, Docker, AppImage, Ubuntu Snap
- Grundlagen: Über FreeCAD, Graphische Oberfläche, Mausbedienung, Auswahlmethoden, Objektname, Programmeinstellungen, Arbeitsbereiche, Dokumentstruktur, Objekteigenschaften, Hilf FreeCAD, Spende
- Hilfe: Tutorien, Video Tutorien
- Arbeitsbereiche: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework