Message 1 of 2
SendCommand AutoCAD customization Python
Not applicable
04-21-2020
02:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I would like to convert dwg to jpg with python script.
Currently, I am using Export function to convert to bmp, then to jpg
import win32com.client
acad = win32com.client.dynamic.Dispatch("AutoCAD.Application")
doc = acad.ActiveDocument
doc.Export(directory,"bmp", None)
The resolution from export function is quite low, so I would like to use plotter, but I have problem with SendCommand.
doc.SendCommand('_-PLOT ' Y' 'Model ' 'PublishToWeb JPG.pc3 ')
It doesn't work correctly. I know that in VBA SendCommand works with '& vbCr +'. How to implement SendComand in Python?
Is there another way to optain high resolution?