Difference between revisions of "TechDraw NewAnnotation"

From FreeCAD Documentation
Jump to: navigation, search
m
(Marked this version for translation)
Line 13: Line 13:
 
# You may need to press recompute  [[Image:View-rotate-right.png|32px]] to get your text to change.
 
# You may need to press recompute  [[Image:View-rotate-right.png|32px]] to get your text to change.
  
 +
<!--T:8-->
 
[[File:UpdateAnnotation.png|300px|center]]
 
[[File:UpdateAnnotation.png|300px|center]]
  
Line 23: Line 24:
 
     ADD_PROPERTY_TYPE(TextColor,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"The color of the text");
 
     ADD_PROPERTY_TYPE(TextColor,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"The color of the text");
  
     ADD_PROPERTY_TYPE(TextSize,(8),vgroup,App::Prop_None,"The size of the text in mm");
+
     <!--T:9-->
 +
ADD_PROPERTY_TYPE(TextSize,(8),vgroup,App::Prop_None,"The size of the text in mm");
 
     ADD_PROPERTY_TYPE(MaxWidth,(-1.0),vgroup,App::Prop_None,"The maximum width of the Annotation block");
 
     ADD_PROPERTY_TYPE(MaxWidth,(-1.0),vgroup,App::Prop_None,"The maximum width of the Annotation block");
 
     ADD_PROPERTY_TYPE(LineSpace,(80),vgroup,App::Prop_None,"Line spacing adjustment");
 
     ADD_PROPERTY_TYPE(LineSpace,(80),vgroup,App::Prop_None,"Line spacing adjustment");
  
     TextStyle.setEnums(TextStyleEnums);
+
     <!--T:10-->
 +
TextStyle.setEnums(TextStyleEnums);
 
     ADD_PROPERTY(TextStyle, ((long)0));
 
     ADD_PROPERTY(TextStyle, ((long)0));
  
 +
<!--T:11-->
 
* {{PropertyData|Text}}: The text to be displayed.
 
* {{PropertyData|Text}}: The text to be displayed.
 
* {{PropertyData|Font}}: The name of the font to use.  Annotation will use the best match of installed fonts.
 
* {{PropertyData|Font}}: The name of the font to use.  Annotation will use the best match of installed fonts.
Line 38: Line 42:
 
* {{PropertyData|TextStylee}}: "Normal", "Bold", "Italic", "Bold-Italic"
 
* {{PropertyData|TextStylee}}: "Normal", "Bold", "Italic", "Bold-Italic"
  
 +
<!--T:12-->
 
Note: Annotation inherits all applicable basic View properties except Scale. Use the TextSize property instead.
 
Note: Annotation inherits all applicable basic View properties except Scale. Use the TextSize property instead.
  
Line 50: Line 55:
 
}}
 
}}
 
<translate>
 
<translate>
==Notes==<!--T:7-->
+
==Notes== <!--T:7-->
 
* None at this time  
 
* None at this time  
 
</translate>
 
</translate>
 
{{clear}}
 
{{clear}}
 
<languages/>
 
<languages/>

Revision as of 22:33, 18 October 2016

TechDraw NewAnnotation.png TechDraw NewAnnotation

Menu location
TechDraw → Annotation
Workbenches
TechDraw
Default shortcut
Introduced in version
-
See also


Description

The Annotation tool adds a text block to a drawing page.

AnnotationSample.png

How to use

  1. If you have multiple drawing pages in your document, you will need to select the desired page in the tree.
  2. Press the TechDraw NewAnnotation.png Annotation button
  3. A text block containing "Default Text" will appear on the page. Use the property editor to change the text. Drag the Annotation to the required position.
  4. You may need to press recompute View-rotate-right.png to get your text to change.
UpdateAnnotation.png

Options

None.

Properties

   ADD_PROPERTY_TYPE(Text ,("Default Text"),vgroup,App::Prop_None,"The text to be displayed");
   ADD_PROPERTY_TYPE(Font ,(fontName.c_str()),vgroup,App::Prop_None, "The name of the font to use");
   ADD_PROPERTY_TYPE(TextColor,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"The color of the text");
   ADD_PROPERTY_TYPE(TextSize,(8),vgroup,App::Prop_None,"The size of the text in mm");
   ADD_PROPERTY_TYPE(MaxWidth,(-1.0),vgroup,App::Prop_None,"The maximum width of the Annotation block");
   ADD_PROPERTY_TYPE(LineSpace,(80),vgroup,App::Prop_None,"Line spacing adjustment");
   TextStyle.setEnums(TextStyleEnums);
   ADD_PROPERTY(TextStyle, ((long)0));
  • DATAText: The text to be displayed.
  • DATAFont: The name of the font to use. Annotation will use the best match of installed fonts.
  • DATATextColor: The color of the text.
  • DATATextSize: The size of the text in mm.
  • DATAMaxWidth: The maximum width of the Annotation block. -1 indicates no maximum width.
  • DATALineSpace: Line spacing adjustment (%).
  • DATATextStylee: "Normal", "Bold", "Italic", "Bold-Italic"

Note: Annotation inherits all applicable basic View properties except Scale. Use the TextSize property instead.

Scripting

Sections can be added to Pages using Python.

anno = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewAnnotation','TestAnno')
anno.Text = ['Different Text']
anno.TextStyle = 'Bold'
rc = page.addView(anno)

Notes

  • None at this time
Other languages:
Deutsch • ‎English • ‎français • ‎italiano • ‎română • ‎русский