Results 1 to 2 of 2

Thread: ImageAttach directing directory location

  1. #1
    I could stop if I wanted to CadDog's Avatar
    Join Date
    2005-06
    Location
    So Ca
    Posts
    439
    Login to Give a bone
    0

    Question ImageAttach directing directory location

    Hi again All,

    I have a question about programing within a Tool Palette.

    Traffic has many jpg's and have create a file for each sign.

    I don't any problem with blocks because I can add the path where to open get the blocks.
    However, I found that IMAGEATTACH doesn't work the same.

    It open the directory that was last used.

    I have try create a lisp with the path to the traffic jpg signs location with no luck.


    Here what I have done for blocks:

    I added this in the Tool Pro...
    Code:
    ^csymbolr;\(getvar "dimscale");;;
    The "Symbolr" command is added in AcadDoc.lsp
    Code:
    (defun c:symbolr (/ symr)	;Roadway symbols
       (Setvar "cmdecho" 0)
       (setq symr (getfiled "Select a symbol you Need" symrpath "dwg" 8 ))
       (command "insert" symr)(Setvar "cmdecho" 1)(princ))
    This lets the user pick the "tool palettes" tool and have it open within the right directory.

    Again, I wasn't able to do this with ImageAttach.

    Any and all help or comments are welcome.

    Thanks
    Attached Images Attached Images
    Last edited by BlackBox; 2017-12-13 at 08:40 PM. Reason: Please use [CODE] Tags

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

    Default Re: ImageAttach directing directory location

    Try this method its in a loop and inserts around 30 images in one go so I know it works.

    Code:
    (setq mspace (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))))
    (setq name (strcat "P:\\xxxxx\\" blknum ".jpg"  ))
    (vla-AddRaster mspace name inspt 1.5 0.0)

Similar Threads

  1. Location of Call Out | Location of Detail
    By baker in forum AutoCAD Sheet Set Manager
    Replies: 1
    Last Post: 2013-07-10, 06:06 PM
  2. 2011: imageattach
    By dhagen in forum AMEP General
    Replies: 3
    Last Post: 2010-11-01, 10:20 AM
  3. publish dwf directory
    By pbrumberg in forum AutoCAD Plotting
    Replies: 0
    Last Post: 2007-10-04, 03:15 PM
  4. Current dvb Directory
    By Opie in forum VBA/COM Interop
    Replies: 4
    Last Post: 2005-09-13, 04:12 PM
  5. Save directory location in AutoLISP routine.
    By bartstienaers in forum AutoLISP
    Replies: 3
    Last Post: 2005-09-09, 07:32 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
  •