I'm new to FreeCAD and I'm working on a custom workbench. At the moment I am trying to create an Image Plane in my Python script similarly to the Image Plane I can create in the GUI in the Image workbench. I have tried the following:
Code: Select all
import FreeCAD, FreeCADGui
import Image, ImageGui
import Part, PartGui
class PlaceImage:
def Activated(self):
""" This code gets executed when the corresponding button is pressed."""
doc = FreeCAD.activeDocument()
img_plane = doc.addObject("Image::ImagePlane', 'ImagePlane")
Code: Select all
No document object found of type 'Image::ImagePlane', 'ImagePlane'