Autolisp required for EMBED

Autolisp required for EMBED

karthikeyanskm
Contributor Contributor
206 Views
1 Reply
Message 1 of 2

Autolisp required for EMBED

karthikeyanskm
Contributor
Contributor

I team my tiff comes with a default name IMAGE & IMAGE_G.

Whenever i save or print it need to be embeded and save automatically.
My present lisp followed for saving files automatically is the below code

(defun C:Q ()
(Command "-purge" "ALL" "" "N")
(Princ)
(Command "_zoom" "E" "QSAVE" "Close")
(Princ)
)


I need a support to modify the lisp so that it shall be useful for both dwg as well as raster.

 

Whenever i enter the command Q , It shall follow the below steps

 

For CADFor Raster
It shall change from model to layout.It shall select the file named IMAGE & IMAGE_G
It shall embed both the files
It shall save the raster file and export to tiff of utilising CCITT Group 4 compression, in non-tiled format and at original size. The resolution shall not exceed 300 dpi
It shall change from model to layout.
It shall purge all unwanted layerIt shall purge all unwanted layer
Layout shall be zoomed to extend by bringing to centre of the windowLayout shall be zoomed to extend by bringing to centre of the window
It shall close the cad fileIt shall close the cad file



I need to use one common command for both the tiff and cad files

0 Likes
207 Views
1 Reply
Reply (1)
Message 2 of 2

Sea-Haven
Mentor
Mentor

Your code is what you have submitted just copy and paste all the manual steps to a lisp, this will take you to the 1st layout. Have 2 defuns QC & QR.

 

(setvar 'ctab (car (layoutlist)))

 Can check if your in Model rather than a layout

(setq spc (getvar 'ctab)) ; if "Model" then do something
0 Likes