You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run this python code for the captioned, the error occured as follows, File "c:\Users\sonsun\AppData\Local\Programs\Python\Python311\Lib\site-packages\comtypes\automation.py", line 843, in _invoke
self.__com_Invoke(memid, riid_null, lcid, invkind, dp, var, None, argerr)
_ctypes.COMError: (-2147352567, '예외가 발생했습니다.', ('Invalid argument Point in GetPoint', 'AutoCAD', 'C:\Program Files\Autodesk\AutoCAD 2019\HELP\OLE_ERR.CHM', -2145320939, None))
for the following code,
from pyautocad import Autocad, APoint
acad = Autocad(create_if_not_exists=True)
doc = acad.ActiveDocument
def gpuser():
sp = APoint(0, 0, 0) # Initializing sp with coordinates (0, 0, 0)
ep = APoint(0, 0, 0) # Initializing ep with coordinates (0, 0, 0)
rp = APoint(0, 0, 0) # Initializing rp with coordinates (0, 0, 0)
sp = doc.Utility.GetPoint("\nBottom-left corner on the column:")
ep = doc.Utility.GetPoint("\nBottom-right corner on the column:")
rp = doc.Utility.GetPoint("\nTop-left corner on the row:")
print("sp(1) input =", sp[0]) # Assuming you want to print the X coordinate of the 'sp' point
gpuser()
How can I fix the error and to get the correct response from the active autocad drawing.
Thanks in advance,
Sun, Son
The text was updated successfully, but these errors were encountered:
When I run this python code for the captioned, the error occured as follows, File "c:\Users\sonsun\AppData\Local\Programs\Python\Python311\Lib\site-packages\comtypes\automation.py", line 843, in _invoke
self.__com_Invoke(memid, riid_null, lcid, invkind, dp, var, None, argerr)
_ctypes.COMError: (-2147352567, '예외가 발생했습니다.', ('Invalid argument Point in GetPoint', 'AutoCAD', 'C:\Program Files\Autodesk\AutoCAD 2019\HELP\OLE_ERR.CHM', -2145320939, None))
for the following code,
from pyautocad import Autocad, APoint
acad = Autocad(create_if_not_exists=True)
doc = acad.ActiveDocument
def gpuser():
sp = APoint(0, 0, 0) # Initializing sp with coordinates (0, 0, 0)
ep = APoint(0, 0, 0) # Initializing ep with coordinates (0, 0, 0)
rp = APoint(0, 0, 0) # Initializing rp with coordinates (0, 0, 0)
sp = doc.Utility.GetPoint("\nBottom-left corner on the column:")
ep = doc.Utility.GetPoint("\nBottom-right corner on the column:")
rp = doc.Utility.GetPoint("\nTop-left corner on the row:")
print("sp(1) input =", sp[0]) # Assuming you want to print the X coordinate of the 'sp' point
gpuser()
How can I fix the error and to get the correct response from the active autocad drawing.
Thanks in advance,
Sun, Son
The text was updated successfully, but these errors were encountered: