.NET

Reply
New Member
spyder3739
Posts: 2
Registered: ‎10-15-2012
Message 1 of 2 (348 Views)

When plot "PNG or JPG" file, How to edit Paper Size using Custom Paper Size?

348 Views, 1 Replies
10-17-2012 05:33 AM

Hello, I have some questions.

 

Using ObjectARX2013, I have to solve problems.

 

When I plot PNG or JPG file, its paper size is needed to edit according to drawing size.

 

I want to know the source code or function(or method) - C#.

 

Please help me.

 

Thanks.

 

*Expert Elite*
norman.yuan
Posts: 1,045
Registered: ‎04-27-2009
Message 2 of 2 (320 Views)

Re: When plot "PNG or JPG" file, How to edit Paper Size using Custom P

10-17-2012 02:25 PM in reply to: spyder3739

I just posted a similar question a while ago and the reply from SENL 1363 offerred the solution I needed exactly.

 

Pay attention to code

 

plotInfo.DeviceOverride=tds;

 

and

 

validator.MediaMatchingPolicy = Autodesk.AutoCAD.PlottingServices.MatchingPolicy.MatchEnabledCustom

and

 

int itIs = validator.IsCustonPossible(plotInfo);

 

The last line of code means that you do not need to define a custom size of paper. When IsCustomPossible() called, AutoCAD will create a custom sized paper to match the defined plot area (Layout/Window...). If it returns 0, it means, you can go ahead with the plotting. For the details of the returned value from IsCustomPossible, you need to find it in ObjectARX C++ API documentation, not managed API documentation.

 

HTH

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!