vb外部调用autocad_在vb中如何调用autocad进行打印

''''取当前文档对从顶模型空属性DimindexAsIntegerForindex=0Tosp.Count-1DimnameAsStringname=sp.Item(index).ObjectName''''判断模型空间中的项目是否是一个块引用IfnameLike"*Ac*"ThenDimblockRefAsAcadBlockReferenceSetblockRef=sp.Item(index)''''块引用的插入点DiminsertPointAsVariantinsertPoint=blockRef.InsertionPoint''''放大比例DimxScale,yScaleAsIntegerxScale=blockRef.XScaleFactoryScale=blockRef.YScaleFactor''''宽高基数Dimwidth,heightAsDoublewidth=297height=210''''打印区域DimUpperRight(0To1)AsDouble,LowerLeft(0To1)AsDoubleUpperRight(0)=insertPoint(0)UpperRight(1)=insertPoint(1)LowerLeft(0)=insertPoint(0)+width*xScaleLowerLeft(1)=insertPoint(1)-height*yScalelist.AddItem"inserPoint:X="&UpperRight(0)&"Y:"&UpperRight(1)list.AddItem"lowerLeft:X="&LowerLeft(0)&"Y:"&LowerLeft(1)DimplotConfsAsAcadPlotConfigurationsSetplotConfs=ThisDrawing.PlotConfigurationslist.AddItemplotConfs.CountDimplotconfAsAcadPlotConfigurationSetplotconf=plotConfs.Add("plot")''''list.AddItemplotconf.GetPlotDeviceNames(5)''''SetplotConf=ThisDrawing.PlotConfigurations.Add''''设置定义要打印的布局范围的坐标ThisDrawing.ActiveLayout.SetWindowToPlotLowerLeft,UpperRight''''指定布局或打印配置的类型ThisDrawing.ActiveLayout.PlotType=acWindow''''按局部或完整视图预览方式显示打印预览对话框ThisDrawing.Plot.DisplayPlotPreviewacFullPreview''''打印布局到设备ThisDrawing.Plot.PlotToDeviceEndIfNextindex

阅读全文 >

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值