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.
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
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