Previous Document Next Document

Object Model Reference : Classes : L : Layer : Methods : Layer.Import


Layer.Import

Sub Import(FileName As String, [Filter As cdrFilter = cdrAutoSense], [Options As StructImportOptions])

Description

Member of Layer

The Import method imports shapes from a disk file and places them on a specified layer.

 
The imported shapes are selected after the method is executed. You can use the Document.Selection function to access those shapes.

Parameter
Description
FileName
Specifies the full path name of the disk file that contains the shapes to be imported. For example, the following FileName value represents a CorelDRAW document that is stored at the root of the C drive and that is named Importing.cdr:
C:\Importing.cdr
Filter
Specifies the import filter, and returns cdrFilter. This parameter is optional, and its default value is cdrAutoSense (0).
Options
Specifies additional parameters for the import. This parameter is optional, and its default value is Nothing.

VBA example

The following VBA example imports the file mygraphic.cmx (stored at the root of C) to the active layer.

Sub Test()
 ActiveLayer.Import "C:\MyGraphic.cmx"
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.