|
|
| Menu location |
|---|
| Tools → Text Document |
| Workbenches |
| All |
| Default shortcut |
| None |
| Introduced in version |
| 0.19 |
| See also |
| Draft ShapeString, Draft Text |
Descripción
The Std TextDocument command creates an object capable of holding arbitrary text. This element can be used to write general information or documentation about the model.
Uso
- Select the Tools →
Text Document option from the menu.
- Double-click the newly created object in the Tree View to open a tab in which to write text.
- Add text.
- Close the tab and save the file when asked.
Propiedades
Vista
Editor
- VistaFont Name (
Font): a font name, for example,Ubuntu Mono. - VistaFont Size (
Float): a font size in points, for example,11. - VistaRead Only (
Bool): it defaults tofalse. If set totruethe text cannot be edited. - VistaSyntax Highlighter (
Enumeration): it defaults toNone. If set toPython, the text will be highlighted like the Python Console.
Programación
Ver también: Conceptos básicos de scripting en FreeCAD, y Objetos con scripting.
See Part Feature for the general information on adding objects to a document.
An App::TextDocument object is created with the addObject() method of the document. Once a TextDocument exists, its textual information is stored in its Text attribute. This attribute can be used in other objects, for example, as the string in a Draft ShapeString.
import FreeCAD as App
import Draft
doc = App.newDocument()
obj = doc.addObject("App::TextDocument", "Text_document")
obj.Text = "textual information"
doc.recompute()
obj2 = Draft.makeShapeString(obj.Text, "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 10)
doc.recompute()
Esta página ha sido recuperada de https://wiki.freecad.org/Std_TextDocument