.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

load dsd file and publish to pdf

1 REPLY 1
SOLVED
Reply
Message 1 of 2
nicola_confortoXF9ZU
156 Views, 1 Reply

load dsd file and publish to pdf

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?

1 REPLY 1
Message 2 of 2

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.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report