0 Members and 1 Guest are viewing this topic.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Xref Images Function ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;(defun C:Images () (setvar "ctab" "A0-0 COVER") (setvar "filedia" 0) (setenv "XLOADPATH" (getvar "dwgprefix")) (initget 1 "V A F") (setq tmp (getkword "\n* Xref Images: [V]icinity map [A]erial image [F]ront elevation *")) (if (not tmp) (setq tmp "P")) (cond ((= "V" tmp) (command "IMAGEATTACH" "Vicinity Map.png")) ((= "A" tmp) (command "IMAGEATTACH" "Aerial Image.png")) ((= "F" tmp) (command "IMAGEATTACH" "Front Elevation.png"))) (setvar "filedia" 1) (princ))
(setq owner (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))) imageName "c:\\legit_path\\legit_file_name.cal" insertionPoint '(0.0 0.0 0.0) scalefactor 1.0 rotationAngle 0.0)(vlax-invoke owner 'AddRaster imageName insertionPoint scalefactor rotationAngle)
Ron, your routine works like mine. I would like to set the image without the dialog box...Setting the insertion point, scale etc thru lisp....
Ron, what is spc(vlax-invoke (vla-get-paperspace spc) 'addraster f p 1. 0.)