TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started 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.
-
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
-
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...
-
What are you trying to export an image of? Linework drawing? Rendered image? Or...?
-
Thanks for your reply.
Linework. I want it to work like betterwmf...
-
What is your end goal with the image file?
-
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.
-
Depending on the end result desired, I was going to suggest outputting to PDF and then converting it to JPEG or EPS through Adobe.
-
i usually plot to PNG format
it it quite good for linework
-
i usually plot to PNG format
it it quite good for linework
Yeah - JPG is one of the worst choices of format for that.
-
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.
-
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?
-
Like Vovka said .. use PNG. JPG is horrible quality.
-
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(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.
-
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.
-
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.
-
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.