明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1827|回复: 1

objLayout.PlotType = AcPlotType.acWindow;提示错误

[复制链接]
发表于 2011-6-22 19:27 | 显示全部楼层 |阅读模式
本帖最后由 Source_Liu 于 2011-6-22 20:10 编辑

请高人指点,为什么objLayout.PlotType = AcPlotType.acWindow提示错误: 未处理 System.Runtime.InteropServices.COMException
  HelpLink="D:\\Program Files\\AutoCAD 2008\\HELP\\OLE_ERR.CHM#-2145386493"
  Message="输入无效"
  Source="AutoCAD.Application"
  ErrorCode=-2145386493
  StackTrace:
       在 Autodesk.AutoCAD.Interop.Common.IAcadLayout.set_PlotType(AcPlotType pType)
       在 Source.AcadCom.SetPlotConfiguration(PrintConfigure printConfigure, AcadLayout objLayout) 位置 D:\Source\Project\AcadCom.cs:行号 173
       在 Source.AcadCom.PreviewByBlock(PrintConfigure printConfigure, String fileName) 位置 D:\Source\Project\AcadCom.cs:行号 125
       在 Source.Project.frmBatchPlot.cmdPreview_Click(Object sender, EventArgs e) 位置 D:\Source\Project\Form1.cs:行号 266
       在 System.Windows.Forms.Control.OnClick(EventArgs e)
       在 System.Windows.Forms.Button.OnClick(EventArgs e)
       在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       在 System.Windows.Forms.Control.WndProc(Message& m)
       在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
       在 System.Windows.Forms.Button.WndProc(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       在 System.Windows.Forms.Application.Run(Form mainForm)
       在 Source.Project.Program.Main() 位置 D:\Source\Project\Program.cs:行号 17
       在 System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       在 System.Threading.ThreadHelper.ThreadStart()


我做打印程序,卡在这一步了


请高手指点,完成后一定贡献源码


发表于 2011-6-26 17:48 | 显示全部楼层
必须先执行SetPlotWindowArea,然后执行SetPlotType
回复 支持 1 反对 0

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-8 00:10 , Processed in 0.201027 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表