I am trying to develop a .NET application that will print existing .dwg format files using the Solidworks API.
The problem is that I am unclear about how to open the file for printing. I have tried locating the file using an OpenFileDialog control, and then printing the file using IPrintManager, as below:
if (openFileDialog1.ShowDialog() == DialogResult.OK)
var filePath = openFileDialog1.FileName;
...but this just throws an "Object reference not set" error.
I only want to take an existing file and send it to the printer. How can I do this?
On further review, I see what a dumb question this is. The examples under IPrintManager in the API help spell out what I'm trying to do.