Hi,

I've been having some troubles accessing AutoCad through the COM
interface. First came the problem with win32com about passing an array
of doubles, which was already talked within this list by another person,
to which the solution was to use array.array('d',sequence), but now I've
stumbled across another problem:

I want to use in AutoCAD the command "measure", but want to pass an
object which was already picked by the user. I tried to use the
SendCommand method in various ways but wasn't successful to pass this
object. The closest I got was to use SendCommand("_measure %f,%f" %
coords[:2]) where coords are the coordinates of the click as passed from
GetEntity(). However, in this manner I still have to go to AutoCAD and
manually use enter or the spacebar to complete the command. Using
"_measure %f,%f " or "_measure %f,%f\n" doesn't work (it says *Invalid*
as if I had not clicked an object). There are also some subtleties when
I use "\r" which makes even valid coordinates not select the right
object. Also, it appears using some other commands like "circle 0,0 4 "
work, so I'm puzzled. Is this an AutoCAD limitation?

So, I ask: do you know of any way to use this measure command in AutoCAD
from a python script?

Thanks,
Ronan


------------------------------------------------------------------------------
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to