The Plot event does not provide such information.
It is limited to what the "BeginPlotEventArgs" class provides.
I was on vacation for a while. So, this reply might be a late. But here it goes anyway.
Have you looked at Autodesk.AutoCAD.PlottingServices.PlotReactorManag
It raises events when AutoCAD plots: Begin/EndPlot, Begin/EndDocument, BeginEndPage... I am not sure what "Plot" event Balaji was referring to, but PlotReactorManager class provides all information you need to know (copies of plot, paper size, plot device name...via BeginPlot/Document/PageEventArgs.
So, simply get an instance of PlotReactorManager and handle the events raised by it, you'll get all the information whan AutoCAD plots. Specifically, if you need to know paper size, you need to handle BeginPage, and the BeginPageEventArgs has a property "PlotInfo", which intern has a property "ValidatedSettings" (type of PlotSettings), from which you can get the information of paper size, scale...
I posted an article a couple of years ago that might be of help to you:
Sorry, I did not pay attention to the "BeginPageEventArgs" class.
Thanks to Norman for correcting me and the link to his nice blog post.
Imports Autodesk.AutoCAD.PlottingServices Public Class AMRLISP Dim WithEvents PlotManager As PlotReactorManager Private Sub PlotManager_BeginPlot(sender As Object, e As BeginPlotEventArgs) Handles PlotManager.BeginPlot MsgBox("BeginPlot") End Sub End Class
thankyou Mr. norman.yuan
can help me with above code?? plz
the message doesn't appear ... Why ??
Can you try this ?
Public Sub InitializePlotEvents() mPlotReactorManager = New PlotReactorManager() AddHandler mPlotReactorManager.BeginPlot, AddressOf BeginPlot AddHandler mPlotReactorManager.EndPlot, AddressOf EndPlot End Sub Private Sub BeginPlot(ByVal sender As Object, ByVal e As Autodesk.AutoCAD.PlottingServices.BeginPlotEventAr
gs) WriteMessage("BeginPlot") End Sub Private Sub EndPlot(ByVal sender As Object, ByVal e As Autodesk.AutoCAD.PlottingServices.EndPlotEventArgs ) WriteMessage("EndPlot") End Sub
Also remember to set the "BACKGROUNDPLOT” system variable to 0.
i need to use events not delegates
i know this way but i need to use the events , but i don't know what can i write in Initialize Method to run my events
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register