I thought I had read somewhere that it is possible to use the Geometry namespace without actually running AutoCAD (just accessing the library).
Point3d origin = new Point3d(0, 0, 0);
Matrix3d transform = Matrix3d.Displacement(pts[3].GetVectorTo(origin));
The previous two lines of code generate this error:
'System.InvalidProgramException' occurred in <mylib>.dll
Additional information: Common Language Runtime detected an invalid program.
Am I missing something potentially stupid, or is it not possible to use the Geometry namespace without running AutoCAD?
No, that's not the case. I believe it may be possible with the version
that's included with Autodesk Inventor and possibly other vertical
products, but not with AutoCAD alone. The geometry library lives
inside of acdbmgd.dll so there's no way it can be loaded into any
process other than acad.exe.
We happen to have Inventor - so I guess that might be worth investigating. Unfortunately, I've developed a quite a few algorithms around AutoCAD's geometry that I am now being asked to replicate in other in-house applications. It would have been quite nice to avoid duplicating the same functionality. So it goes.