Import Method

Back to Methods Reference

Imports a drawing or a group of saved layer settings from a file.

Signatures: Overview

Drawing 

VBA : RetVal = object.Import(FileName, InsertionPoint, ScaleFactor) 

VL : RetVal = (vla-Import object FileName InsertionPoint Scale Factor)

Layer Settings 

VBA : object.Import FileName 

VL : (vla-Import object FileName)


Signatures: Detail

RetVal = object.Import(FileName, InsertionPoint, ScaleFactor)

VL : RetVal = (vla-Import object FileName InsertionPoint Scale Factor)

(vla-Import thisdrawing "c:/test.dxf" thepoint thescale)

  • Object : Document
    The object or objects this method applies to.

  • FileName : String; input-only
    The name of the file to be imported.

  • InsertionPoint : Variant (three-element array of doubles); input-only
    The 3D WCS coordinates location in the current drawing where the imported file is placed.

  • ScaleFactor : Double; input-only
    The scale used to place the imported file.

  • RetVal : Object
    In the case of importing a WMF file, a BlockReference object is returned. In all other cases, the return value is NULL.


VBA : object.Import FileName

VL : (vla-Import object FileName)

  • Object : LayerStateManager
    A LayerStateManager object.

  • FileName : String; input-only
    The name of the file you are importing layer settings from.

Example :


(defun c:al-import ()

(vl-load-com)

(setq thisdrawing (vla-get-activedocument 
                                      (vlax-get-acad-object)))

(setq util (vla-get-utility thisdrawing))
                        
(setq thepoint (vla-GetPoint util nil "\nInsertion Point: "))

(setq thescale (vla-GetReal util "\nEnter Scale Factor : "))
                        
(vla-Import thisdrawing "c:/test.dxf" thepoint thescale)

(princ)

);defun

 
The AutoLisp/Visual Lisp/VBA Resource Website
Google
Search the WWW Search AfraLisp

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website