乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 27|回复: 1

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

[复制链接]

6

主题

16

帖子

3

银币

初来乍到

Rank: 1

铜币
40
发表于 2011-6-22 19:27:00 | 显示全部楼层 |阅读模式
请高人指点,为什么objLayout.PlotType = AcPlotType.acWindow提示错误: 未处理 System.Runtime.InteropServices.COMException
  HelpLink="D:\\Program Files\\ 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()
我做打印程序,卡在这一步了
请高手指点,完成后一定贡献源码
回复

使用道具 举报

13

主题

84

帖子

6

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
136
发表于 2011-6-26 17:48:00 | 显示全部楼层
必须先执行SetPlotWindowArea,然后执行SetPlotType
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-15 15:05 , Processed in 6.375553 second(s), 57 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表