Running AutoCAD from MatLAB

12 ビュー (過去 30 日間)
NAFTALI HERSCOVICI
NAFTALI HERSCOVICI 2024 年 8 月 26 日
コメント済み: Mario Malic 2024 年 8 月 27 日
Hello, \\trying to run AutoCAD from MATLAB.
Tried the code proposed here
Unfortunately I got this error
Error using dotnetAutoCADExample
Message: Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))
Source: Autodesk.AutoCAD.Interop
HelpLink: None
The topic was closed so I was not able to ask questions there.
Any useas?
What I need to do is plot some objects based on numbers calculated in a loop in MATLAB
Thank you
  5 件のコメント
NAFTALI HERSCOVICI
NAFTALI HERSCOVICI 2024 年 8 月 27 日
this is the error message I get:
Error using dotnetAutoCADExample
Message: Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))
Source: Autodesk.AutoCAD.Interop
HelpLink: None
Mario Malic
Mario Malic 2024 年 8 月 27 日
I don't know much about dotnet function, it might be possible that AutoCAD allows the access in newer versions. If you have the newer version, try with it.
Otherwise, try to start it with actxserver. You need to find out the exact name for your version though on internet. Maybe this helps.
AcadApp=actxserver('AutoCAD.Application.19.1'); % AutoCAD2014
AcadApp.Visible = true();
AcadDoc = AcadApp.ActiveDocument;
AcadModelSpace = AcadDoc.ModelSpace;
lineObj = AcadModelSpace.AddLine([0,0,0]',[1,0,0]'); % drawing a line

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeManage Products についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by