Dim acView As ViewTableRecord = acDoc.Editor.GetCurrentView()
Dim eExtents As Extents3d = New Extents3d(New Point3d(0, 0, 0), New Point3d(630, 445.5, 0))
' Translates WCS coordinates to DCS
Dim matWCS2DCS As Matrix3d
matWCS2DCS = Matrix3d.PlaneToWorld(acView.ViewDirection)
matWCS2DCS = Matrix3d.Displacement(acView.Target - Point3d.Origin) * matWCS2DCS
matWCS2DCS = Matrix3d.Rotation(-acView.ViewTwist,
acView.ViewDirection,
acView.Target) * matWCS2DCS
' Tranforms the extents to DCS
matWCS2DCS = matWCS2DCS.Inverse()
eExtents.TransformBy(matWCS2DCS)
' Defines the area to output
acPlSetVdr.SetPlotType(acPlSet, Autodesk.AutoCAD.DatabaseServices.PlotType.Window)
acPlSetVdr.SetPlotWindowArea(acPlSet, New Extents2d(eExtents.MinPoint.X, eExtents.MinPoint.Y,
eExtents.MaxPoint.X, eExtents.MaxPoint.Y))
https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2018/ENU/OARX-ManagedRefGuide/files/OREF ... ttingsValidator-SetPlotWindowArea-PlotSettings-Extents2d-html.html
[本日志由 tiancao1001 于 2018-11-30 00:52 AM 编辑]
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |