Posts: 212
Registered: ‎08-24-2010
Message 11 of 12 (60 Views)

Re: Plotting Device Information with events

05-07-2013 04:13 AM in reply to: Amremad

it's work good

but i have two think can't catch it

1- Scale 

2- which layout printed

*Expert Elite*
Posts: 959
Registered: ‎04-27-2009
Message 12 of 12 (52 Views)

Re: Plotting Device Information with events

05-07-2013 06:40 AM in reply to: Amremad

As my previous reply pointed out: in the BeginPage event handler, the BeginPageEventArgs provides the information you need.


The code would be like:


void MyPlotReactorManager_BeginPage(object sender, BeginPageEventArgs e)


    //Get Layout name the current plotted page is plotting

    PlotInfo pInfo=e.PoltInfo;

    ObjectId layoutId=pInfo.Layout;

    //Then, you can open a transaction to get Layout object, hence, its name


    //Get scale, depending on whether standard or custom scale is used

    PlotSettings pSettings=pInfo.ValidatedSettings;

    CustomScale scale=pSetting.CustomPrintScale;


    double stdScale=pSetting.StdScale


   //Paper size

   Point2d size=pSettiings.PlotPaperSize



Note, the code is just off my head and not tested, but you get the idea: just digging into BeginPageEventArgs's PlotInfo property would get all information you need.


You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community