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

Add plot custom paper size

23 REPLIES 23
Reply
Message 1 of 24
Anonymous
3330 Views, 23 Replies

Add plot custom paper size

Is it possible to add a new custom paper size in plot configuration (PublishToWeb JPG.pc3) using C#?
Thanks
23 REPLIES 23
Message 21 of 24
khoa.ho
in reply to: SENL1362

Yes, there are lots of useful information while I started to debug PiaNO project. The main abstract class PiaFile is where I got started with PiaNO initially. From there, you can try many implemented classes such as PlotterConfiguration (for .pc3 file), PlotterStyleTable (for .ctb, .stb files), PlotterModelParameters (for .pmp file).

 

Parrish does a great job on this. Let's wait he updates his framework to make the better wrapper with all friendly properties for external references.

Message 22 of 24
SENL1362
in reply to: khoa.ho

agree
Message 23 of 24
khoa.ho
in reply to: Anonymous

For the easy API with AutoCAD user-friendly, you may think to have separate classes for PC3, STB, CTB, PMP files. I would suggest them as Pc3Plot, StbPlot, CtbPlot, PmpPlot which have all their own read/write properties. Then all of four have the same general methods Read() and Write(). The code I imagine is:

 

string inputFile = @"C:\Temp\DWG to PDF.pc3";

string outputFile = @"C:\Temp\Test.pc3";

var pc3Plot = new Pc3Plot(inputFile);

 

// Read properties

string name = pc3Plot.Name;

 

// Write properties

pc3Plot.Sizes.Add("Custom size");

 

// Save file

pc3Plot.Write(); // Update back to the open file

pc3Plot.Write(outputFile); // Save as to another file

 

There are a lot properties when you breakdown the file structure. We should make them look friendly and easy to use as much as possible.

 

Thanks

Message 24 of 24
Anonymous
in reply to: khoa.ho

Khoa,

 

This is basically how it's set up now (minus the shorter naming conventions).  I'll just need to extend the properties for each class to suit the purpose more specifically.  I'll also update the Wiki on the Git project page showing some usage examples.

 

Thanks everyone for the input.  Feedback and suggestions are always welcome.

 

- Parrish

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