TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: JohnSnow on August 27, 2017, 07:23:52 PM

Title: Is there any way that I can export the image other than jpgout command?
Post by: JohnSnow on August 27, 2017, 07:23:52 PM
Like I can select some items and then export them as an image?
Thanks in advance.
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: tombu on August 27, 2017, 09:23:06 PM
Try exporting them as a WMF file: https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-5D951920-615C-4AEA-B430-B4CC281B3D29-htm.html
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: JohnSnow on August 28, 2017, 02:53:02 AM
Try exporting them as a WMF file: https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-5D951920-615C-4AEA-B430-B4CC281B3D29-htm.html

Thanks for the input.
I find images created in this way are of poor quality tho, just like jpgout command or other methods like plot (to .jpg or .bmp).. There is a software called betterwmf, whereby we can export images that look really good. But I would like to add this method in my routine instead of using this software. I am wondering how can we do that...
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: dgorsman on August 28, 2017, 10:27:00 AM
What are you trying to export an image of?  Linework drawing?  Rendered image?  Or...?
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: JohnSnow on August 29, 2017, 05:31:59 AM
Thanks for your reply.
Linework. I want it to work like betterwmf...
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: ChrisCarlson on August 29, 2017, 08:16:57 AM
What is your end goal with the image file?
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: mjfarrell on August 29, 2017, 08:50:20 AM
if its linework, suggest DXF import into GIMP

for Photoshop you would need to export to EPS file first and them import that into PS.
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: ChrisCarlson on August 29, 2017, 08:54:11 AM
Depending on the end result desired, I was going to suggest outputting to PDF and then converting it to JPEG or EPS through Adobe.
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: VovKa on August 29, 2017, 12:12:46 PM
i usually plot to PNG format
it it quite good for linework
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: dgorsman on August 29, 2017, 03:43:33 PM
i usually plot to PNG format
it it quite good for linework

Yeah - JPG is one of the worst choices of format for that.
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: JohnSnow on August 29, 2017, 10:13:13 PM
What is your end goal with the image file?

I want to select items in Autocad, transfer to images and then insert in the MS word. I would like the images show the lineweights and so on, which is not shown if I use jpgout command. I have tried plotting into jpg.pc3 but it is of poor quality too.
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: JohnSnow on August 29, 2017, 10:15:33 PM
if its linework, suggest DXF import into GIMP

for Photoshop you would need to export to EPS file first and them import that into PS.

Thanks for the reply. I simply want to export to MS word. Is there any better way to do that?
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: ronjonp on August 30, 2017, 09:57:45 AM
Like Vovka said .. use PNG. JPG is horrible quality.
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: tombu on August 31, 2017, 10:03:07 AM
Just use  extension + OUT for command names like WMFOUT or PNGOUT in your lisp to avoid the dialog box.

For anyone using WMFOUT I'd add
Code: [Select]
(if (/= (getvar 'WmfBkGnd) 0)(progn(setvar 'WmfBkGnd 0)(princ "\nSet WMF background transparent. WmfBkGnd"))) ;Set background color to transparent for creating a WMF.
(if (/= (getvar 'WmfForeGnd) 0)(setvar 'WmfForeGnd 0))
to your acaddoc.lsp file so the linework will always be on a transparent background.
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: BIGAL on August 31, 2017, 10:32:22 PM
What everyone has missed is that you can control the image resolution when using plot to web jpg, as a default it can be real average, simply you create a custom sheet size but work in pixels not say mm my sheets are like 6000x4000 as a size. Just work backwards take your required sheet size and use at least 200dpi as a start, dont get carried away like 600 dpi, this will just make real big jpg's and you will not see the pixelation. We have done A1 sheets and replotted and the you can not see the pixelation unless you get the magnifying glass out, we are plotting at 300 dpi on Hp Inkjet.
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: cmwade77 on September 05, 2017, 07:59:48 PM
What we have setup in the past when we need an image format is we plot to PDF, then use a command line PDF to Image converter to convert the PDF to an Image, this way everything can be automated within a LISP routine and you get everything to the correct scale and a quality image.
Title: Re: Is there any way that I can export the image other than jpgout command?
Post by: Didge on September 18, 2017, 10:48:03 AM
As above.

Plus, the MS Word installation media usually comes with an optional extension to enable the direct import of DWG and DXF files.
These filters are usually disabled for a "Typical Install" so a "Custom Install" is required instead.