Results 1 to 5 of 5

Thread: Get OLE2FRAME or IMAGE file name

  1. #1
    Member
    Join Date
    2015-01
    Posts
    43
    Login to Give a bone
    0

    Default Get OLE2FRAME or IMAGE file name

    I want to create a routine where if the user copy/pastes an OLE object or image from one drawing to another, my routine will copy the selected file from the source project directory to the destination project directory and then reassign the file name of the pasted entity to the file in the destination project directory. The intent here is to prevent inadvertent edits of the wrong documents as well as to prevent broken links when drawings are issued to clients.

    Is there any way to get this information in AutoLISP or Visual LISP? If so, can the links be reassigned? Thanks for any help

  2. #2
    I could stop if I wanted to
    Join Date
    2005-06
    Location
    CORDOBA-ARGENTINA
    Posts
    275
    Login to Give a bone
    0

    Default Re: Get OLE2FRAME or IMAGE file name

    The best way to send a dwg with out broken links , and so on , is to use E-TRANSMIT , it will make a ZIP file , with ALL auxiliary item from the DWG , fonts, styles, and so on .

    Also you can add a description and instructions.

  3. #3
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    560
    Login to Give a bone
    0

    Default Re: Get OLE2FRAME or IMAGE file name

    If you use Vla-get-imagename it will return the image name which includes where it is located. You can then use vl-file-copy to make a copy of it to the current dwg location. The image will be in the xref list as it is in current directory it will load automatically. You may want to look also for repath xref.

  4. #4
    Member
    Join Date
    2015-01
    Posts
    43
    Login to Give a bone
    0

    Default Re: Get OLE2FRAME or IMAGE file name

    Thanks for the help Big-Al. it turns out the function you reference is actually call vla-get-imagefile but you got me there! Does anyone know if there is an equivalent or similar function to get the filename of an OLE object?

  5. #5
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Get OLE2FRAME or IMAGE file name

    Quote Originally Posted by deheylen690271 View Post
    Does anyone know if there is an equivalent or similar function to get the filename of an OLE object?
    Hi,

    Try it with function vla-get-name although you can retrieve the file name also with the function vla-get-imagefile with the help of function:
    Code:
     (vl-filename-base (vla-get-imagefile <vla-object>)) ;; vla-object = rasterimage object
    or this:
    Code:
     (vla-get-name <vla-object>)
    Hope this helps.

Similar Threads

  1. ECW Image File
    By chet.smith in forum AutoCAD Map 3D - General
    Replies: 1
    Last Post: 2008-01-17, 07:20 PM
  2. Insert image file (TIFF) into an AutoCAD drawing file
    By snorcisa in forum AutoCAD General
    Replies: 6
    Last Post: 2007-04-15, 09:51 AM
  3. Can't Insert Tif image "Image file not Valid"
    By dguinan in forum AutoCAD General
    Replies: 4
    Last Post: 2007-01-10, 08:03 PM
  4. Obtain best Image file size for placing in drawing file
    By cadmecheng in forum AutoCAD LT - General
    Replies: 6
    Last Post: 2006-06-02, 07:49 AM
  5. AutoCAD 2005 TIFF Image files - Image file not valid
    By richard_hamilton in forum AutoCAD General
    Replies: 3
    Last Post: 2004-09-30, 11:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •