Class was the way to go. I made a class, then assigned it to the 'tag' of each item in the listview. Then when the plot button is pressed I fill a global object array with the tags from the listview. Works nice.
Class
public class MyPlotParams {
private string DwgPath;
private string DeviceName;
private string PaperSize;
private string ctbName;
private bool ScLw;
private int Cnt;
private Autodesk.AutoCAD.DatabaseServices.StdScaleType ScTyp;
private Autodesk.AutoCAD.DatabaseServices.PlotRotation PltRot;
public MyPlotParams(){}
public MyPlotParams(string DwgPath, string DeviceName, string PaperSize, string ctbName, bool ScLw, int Cnt, Autodesk.AutoCAD.DatabaseServices.StdScaleType ScTyp, Autodesk.AutoCAD.DatabaseServices.PlotRotation PltRot) {
this.DwgPath = DwgPath;
this.DeviceName = DeviceName;
this.Paper = PaperSize;
this.ctbName = ctbName;
this.ScLw = ScLw;
this.Cnt = Cnt;
this.ScTyp = ScTyp;
this.PltRot = PltRot;
}
public string DrawingPath {
get {return DwgPath;}
set {DwgPath = value;}
}
public string Device {
get {return DeviceName;}
set {DeviceName = value;}
}
public string Paper {
get {return PaperSize;}
set {PaperSize = value;}
}
public string ctbFile {
get {return ctbName;}
set {ctbName = value;}
}
public bool ScaleLineweight {
get {return ScLw;}
set {ScLw = value;}
}
public int Amount {
get {return Cnt;}
set {Cnt = value;}
}
public Autodesk.AutoCAD.DatabaseServices.StdScaleType AcScaleType {
get {return ScTyp;}
set {ScTyp = value;}
}
public Autodesk.AutoCAD.DatabaseServices.PlotRotation AcPlotRotation {
get {return PltRot;}
set {PltRot = value;}
}
}
Then when it comes to plotting the drawings.
if (DiaRslt == DialogResult.OK) {
bool IsModel;
Document tempDoc = null;
DocumentCollection DocCol = AcadApp.DocumentManager;
foreach (MyPlotParams mpp in PlotObjectsArray) {
if (mpp != null) {
try {
tempDoc = DocCol.Open(mpp.DrawingPath, true);
using (DocumentLock DocLock = tempDoc.LockDocument()) {
if (string.Compare("Model", LayoutManager.Current.CurrentLayout) == 0) {
IsModel = true;
}
else IsModel = false;
MyPlottingPart(mpp.Device,
mpp.Paper,
mpp.Amount,
mpp.ctbFile,
mpp.AcScaleType,
IsModel,
mpp.ScaleLineweight,
mpp.AcPlotRotation,
true
);
}
}
catch (Autodesk.AutoCAD.Runtime.Exception AcadEr) {
MessageBox.Show(AcadEr.Message, "Drawing error (AutoCAD).");
}
catch (System.Exception ex){
MessageBox.Show(ex.Message, "Drawing error (System).");
}
finally {
if (tempDoc != null) tempDoc.CloseAndDiscard();
}
}
}
}
Thanks again for all the help.