- 积分
- 557
- 明经币
- 个
- 注册时间
- 2012-4-16
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2024-8-7 12:23:49
|
显示全部楼层
已解决
'设置打印方向
Autodesk.AutoCAD.PlottingServices.PlotConfigManager.SetCurrentConfig(ComboBox6.Text)
Dim plotConfig As PlotConfig = Autodesk.AutoCAD.PlottingServices.PlotConfigManager.CurrentConfig
plotConfig.RefreshMediaNameList()
plotConfig.GetMediaBounds(ComboBox7.Text)
Dim PaperSize As Point2d = plotConfig.GetMediaBounds(ComboBox7.Text).PageSize
Dim MinPt As Point2d = DyArea.Area.MinPoint, MaxPt As Point2d = DyArea.Area.MaxPoint
Dim X As Double = Math.Abs(MaxPt.X - MinPt.X), Y As Double = Math.Abs(MaxPt.Y - MinPt.Y)
Select Case comboBox4.Text'打印方向
Case "自动"
If PaperSize.Y > PaperSize.X Then
If X > Y Then acPlSetVdr.SetPlotRotation(acPlSet, PlotRotation.Degrees090)
Else
If Y > X Then acPlSetVdr.SetPlotRotation(acPlSet, PlotRotation.Degrees090)
End If
Case "纵向"
If X > Y Then acPlSetVdr.SetPlotRotation(acPlSet, PlotRotation.Degrees090)
Case "横向"
If Y > X Then acPlSetVdr.SetPlotRotation(acPlSet, PlotRotation.Degrees090)
End Select |
|