- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good morning all,
I'm trying to make an .exe application that uses the library:
- Autodesk.AutoCAD.Interop.Common.dll
- Autodesk.AutoCAD.Interop.dll
I define all my variables in dynamic to be able to launch the application on any AutoCAD and I am not referring to the 2 dlls in my application.
But I am having a problem on this line:
dynamic /* AcadDimAligned */ dimension = doc.ModelSpace.AddDimAligned(
new double [3] {200, 0, 0},
new double [3] {200, 100, 0},
new double [3] {200, 100/2, 0});
dynamic[] po_array = new dynamic [1];
po_array[0] = dimension;
dynamic /*AcadBlockReference*/ fullBlockRefObj = doc.ModelSpace.InsertBlock (location, blockSectionName, 1.0, 1.0, 1.0, 0);
doc.CopyObjects (po_array, fullBlockObj);
The last line gives me an exception: "Invalid objects array"
This works when I reference the 2 dlls and set the po_array array to AcadEntity [], but this only works in 2019 and 2020 the references used are 2020 but this does not work in 2018.
Avez vous une solution à ce problème?
Is it possible to dynamically load the dlls:
- Autodesk.AutoCAD.Interop.Common.dll
- Autodesk.AutoCAD.Interop.dll
depending on the version of AutoCAD started?
Solved! Go to Solution.