2.7.53 insertImg2g


Menu Information

Right-click Context Menu command for a graph window: Insert Images From Files...

Brief Information

Insert image from file into a graph page

Additional Information

Minimum Origin Version Required: 2016 SR0

Command Line Usage

1. insertImg2g fname:="C:\image\Sample.bmp";

2. insertImg2g fname:="C:\image\Sample.bmp" ipg:=Graph1;

3. insertImg2g fname:="C:\image\Sample.bmp" type:=img xyp:=2;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
File Name fname

Input

string

fname$
Filename of the image file to be imported.
Input Page ipg

Input

Page

<active>
If you want to import the image into a graph page or a layout page, use this variable to specify the target page.
Object Type type

Input

int

1
Use this variable to specify the inserted object type.


Option list:

  • img{0}: IMG
  • bmp{1}: BMP
Left x

Input

int

-1
x coordinate of top left corner in percentage of page width.
Top y

Input

int

-1
y coordinate of top left corner in percentage of page height.
Coordinate Mode xyp

Input

int

0
Option list:
  • pixel{0}: Pixel
    The unit of the x,y coordinates is pixel
  • page{1}: % of Page
    The unit of the x,y coordinates is percentage of page size.
  • layer{2}: Set as layer background (IMG type only)
    This option will:
    Set image to be behind data, none selectable, and be used as a background
    Set image to attach to layer and scale in stretch mode
    Set the image dimension to be the same as layer axis scale range
    This option is valid when type:=img.
Object Name oname

Output

string

<optional>
Name of string variable to receive the name of the new graph object.

Description

This X-Function can be used to insert an image in a graph page or a layout page.

Related X-Functions

cd, impinfo, findFiles, impFile


Keywords:import