Article | 60000765 |
Type | Wish |
Product | Engine |
Version | 6014 |
Date Added | 2/6/2009 |
Fixed | Yes [2/6/2009] |
Submitted by | Gareth Moore |
Keywords |
A new command is added to the CommandAction in version 6015 like below :
/// <summary>
/// Inserts an image to the document.
/// </summary>
/// <param name="image">A vdImage Object that is not added to the Document and has already precreated the vdImageDef object and added to the Images collection.</param>
/// <param name="InsertionPoint">The insertion point(gPoint) or "USER",null so the user picks this point to the screen.</param>
/// <returns>True if the command was succesfull.</returns>
public bool CmdImage(vdImage image, object InsertionPoint)
C# example :
//Create the Image
VectorDraw.Professional.vdFigures.vdImage oneimage = new VectorDraw.Professional.vdFigures.vdImage();
oneimage.SetUnRegisterDocument(vdFramedControl.BaseControl.ActiveDocument);
oneimage.setDocumentDefaults();
oneimage.Width = 2.9;
//Create the Image Definition
oneimage.ImageDefinition = vdFramedControl.BaseControl.ActiveDocument.Images.Add("C:\\image.jpg");
//Run the command.
vdFramedControl.BaseControl.ActiveDocument.CommandAction.CmdImage(oneimage, null);