.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Retrieve Current PlotSettings for Layout

1 REPLY 1
Reply
Message 1 of 2
GTVic
272 Views, 1 Reply

How to Retrieve Current PlotSettings for Layout

I am trying to determine the current margins. So far I have the following but I am not sure how to fill in the ???

Dim xx As Extents2d
Dim oPlotSettings As PlotSettings
Dim oPlotSettingsValidator As PlotSettingsValidator = PlotSettingsValidator.Current
Dim oPlotConfig As PlottingServices.PlotConfig = PlottingServices.PlotConfigManager.CurrentConfig
Dim oPlotInfo As PlottingServices.PlotInfo = New PlottingServices.PlotInfo()
Dim oLayoutManager As LayoutManager = LayoutManager.Current
Dim oLayout As Layout = oLayoutManager.GetLayoutId(oLayoutManager.CurrentLayout).GetObject(OpenMode.ForRead, False, False)

oPlotSettings = ???

xx = oPlotSettings.PlotPaperMargins
1 REPLY 1
Message 2 of 2
GTVic
in reply to: GTVic

{code}
Dim CLayout As Layout
Dim Margins As Extents2d, Paper As Geometry.Point2d
With LayoutManager.Current
CLayout = .GetLayoutId(.CurrentLayout).GetObject(OpenMode.ForRead, False, False)
End With
Margins = CLayout.PlotPaperMargins
Paper = CLayout.PlotPaperSize
{code}

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost