Hi everyone,
I am creating a dll in c# for AutoCAD 2020 and I have a 2D Model (Plan) with multiple pages. I have created a dsd-file that has all the information I need: plot syle, plotter, print size and "What to plot: window". I need to plot every single page to PDF.
I want to load the dsd and publsh everything. Any ideas?
Solved! Go to Solution.
Hi everyone,
I am creating a dll in c# for AutoCAD 2020 and I have a 2D Model (Plan) with multiple pages. I have created a dsd-file that has all the information I need: plot syle, plotter, print size and "What to plot: window". I need to plot every single page to PDF.
I want to load the dsd and publsh everything. Any ideas?
Solved! Go to Solution.
Solved by nicola_confortoXF9ZU. Go to Solution.
So it was simple. Just load the dsd with ReadDsd and Publish with the plotter of choice
string dsdFilePath = @"C:\Users\path.dsd";
if (File.Exists(dsdFilePath))
{
using (DsdData dsdDataFile = new DsdData())
{
dsdDataFile.ReadDsd(dsdFilePath);
PlotConfig acPlCfg = PlotConfigManager.SetCurrentConfig("DWG to PDF.PC3"); //or another
Application.Publisher.PublishExecute(dsdDataFile, acPlCfg);
}
}
So it was simple. Just load the dsd with ReadDsd and Publish with the plotter of choice
string dsdFilePath = @"C:\Users\path.dsd";
if (File.Exists(dsdFilePath))
{
using (DsdData dsdDataFile = new DsdData())
{
dsdDataFile.ReadDsd(dsdFilePath);
PlotConfig acPlCfg = PlotConfigManager.SetCurrentConfig("DWG to PDF.PC3"); //or another
Application.Publisher.PublishExecute(dsdDataFile, acPlCfg);
}
}
Can't find what you're looking for? Ask the community or share your knowledge.