load dsd file and publish to pdf

load dsd file and publish to pdf

nicola_confortoXF9ZU
Explorer Explorer
408 Views
1 Reply
Message 1 of 2

load dsd file and publish to pdf

nicola_confortoXF9ZU
Explorer
Explorer

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?

0 Likes
Accepted solutions (1)
409 Views
1 Reply
Reply (1)
Message 2 of 2

nicola_confortoXF9ZU
Explorer
Explorer
Accepted 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); 
} 
}

 

0 Likes