操作cad 内存,修改CAD在内存中的打印纸张参数,怎么操作?
Assembly asm = Assembly.LoadFile(@"D:\vsproject\CadBatch\CadBatch\libry\acdbmgd.dll");Type t1 = asm.GetType("AcDbPlotSettings");
object oPubClass = Activator.CreateInstance(t1, new object[] { theLayout.ModelType });
MethodInfo oMethod = t1.GetMethod("getPlotPaperSize", BindingFlags.Instance | BindingFlags.NonPublic);
Point2d pntop = default(Point2d);
object result = oMethod.Invoke(oPubClass, new Object[] {&pntop.X, & pntop.Y });
Type object21 = result.GetType();
Object object22 = Marshal.PtrToStructure(plotSet.UnmanagedObject, asm.GetType("AcDbPlotSettings"));
页:
[1]