GuiCommand: Name: TechDraw Image MenuLocation: TechDraw , TechDraw Views , Insert Bitmap Image Workbenches: TechDraw_Workbench SeeAlso: TechDraw_Symbol
TechDraw Image
Description
The TechDraw Image tool inserts a bitmap image (PNG, TIFF, JPEG, etc.) from a file into the page as a view.
(v1.0)
: The TechDraw View tool can also create an Image View.
Image inserted in the drawing page
Usage
- If there are multiple drawing pages in the document: optionally activate the desired page by selecting it in the Tree view.
- Select the TechDraw → TechDraw Views →
Insert Bitmap Image option from the menu.
- If there are multiple drawing pages in the document and you have not yet activated a page, the Page Chooser dialog box opens:
- Select the desired page.
- Press the OK button.
- A file browser opens.
- Select an image file.
- An Image View is inserted.
- Optionally change its Scale property to adjust its size.
Properties
See also: Property editor.
An Image View, formally a {{Incode|TechDraw::DrawViewImage}} object, has the properties that are common to all View types. It also has the following additional properties:
Data
{{TitleProperty|Image}}
-
Image File|File: The file containing this bitmap.
-
Image Included|FileIncluded: Embedded image file. System use only.
-
Width|Float: The width of the cropped image in mm. Only used if Crop is
True
. -
Height|Float: The height of the cropped image in mm. Idem.
View
{{TitleProperty|Image}}
- Crop|Bool: Crop the image to Width x Height.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
The Image tool can be used in macros and from the Python console by using the following functions:
dvi = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewImage','TestImage')
rc = page.addView(dvi)
dvi.ImageFile = "pathToMy/imageFile.png"
dvi.Height = 200
dvi.Width = 200
{{TechDraw_Tools_navi}}
⏵ documentation index > TechDraw > TechDraw Image
This page is retrieved from https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/TechDraw_Image.md