VBA 绘图
我正在尝试将我的自定义绘图例程迁移到VBA,并且我对以下代码有问题,我不知道如何设置纸张大小。请提供任何指导...Public Sub FULL_SIZE()
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
Dim Layouts As AcadLayouts, Layout As AcadLayout
Set Layouts = ThisDrawing.Layouts
ThisDrawing.Regen acAllViewports
With ThisDrawing.ActiveLayout
.RefreshPlotDeviceInfo
.GetPlotStyleTableNames
.StyleSheet = "SFA1055.ctb"
.ConfigName = "\\CENTRAL\HP DesignJet 500 42 by HP"
.PlotRotation = ac0degrees
.CenterPlot = True
.PaperUnits = acInches
.ScaleLineweights = False
'.GetLocaleMediaName = "Oversize: Arch D (Landscape)">
.StandardScale = ac1_1
End With
End Sub
编辑:将您的代码包装在标签中
**** Hidden Message ***** 。GetLocaleMediaName = " Oversize:Arch D(Landscape)",MediaName自己决定它想成为什么,如果你旋转情节或使它居中等,它就成为用户的东西。我使用dbx从模板中获取一个好的plotconfig,然后
oLayout。从PC复制。这使得一切都很好。 您需要使用布局的CanonicalMediaName属性来设置纸张大小。您可以使用以下代码来获取当前绘图仪的名称列表:
然后只需找到您需要的名称并将其应用于您的代码。GetLocaleMediaName属性仅检索它没有设置的纸张大小的名称。
页:
[1]