<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: plot example in C# in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/plot-example-in-c/m-p/1436089#M83786</link>
    <description>Okay,&lt;BR /&gt;
I think I've made some progress.&lt;BR /&gt;
&lt;BR /&gt;
I've set doc to the active document and set the plotter configuration to the printer I want to print to.&lt;BR /&gt;
&lt;BR /&gt;
I still cannot figure out where I access plotting.&lt;BR /&gt;
Can someone tell me if I have the right resources to plot?&lt;BR /&gt;
And if so, what part of the model do I access it from?&lt;BR /&gt;
&lt;BR /&gt;
#region Using directives&lt;BR /&gt;
using System;&lt;BR /&gt;
using System.Reflection;&lt;BR /&gt;
using System.Runtime.InteropServices;&lt;BR /&gt;
using Autodesk.AutoCAD.Runtime;&lt;BR /&gt;
using Autodesk.AutoCAD.Interop.Common;&lt;BR /&gt;
using Autodesk.AutoCAD.ApplicationServices;&lt;BR /&gt;
using Autodesk.AutoCAD.PlottingServices;&lt;BR /&gt;
&lt;BR /&gt;
#endregion&lt;BR /&gt;
namespace PlotLayer2PdfFile&lt;BR /&gt;
{&lt;BR /&gt;
	/// &lt;SUMMARY&gt;&lt;BR /&gt;
	/// Summary description for Class1.&lt;BR /&gt;
	/// &lt;/SUMMARY&gt;&lt;BR /&gt;
	public class PDF2FileName&lt;BR /&gt;
	{&lt;BR /&gt;
		[CommandMethod("PlotPDF")]&lt;BR /&gt;
		public void PDF2File()&lt;BR /&gt;
		{&lt;BR /&gt;
		Document doc = Application.DocumentManager.MdiActiveDocument;			&lt;BR /&gt;
		Autodesk.AutoCAD.PlottingServices.PlotConfigManager.SetCurrentConfig("CutePDF Writer"); &lt;BR /&gt;
	   &lt;BR /&gt;
			&lt;BR /&gt;
		//CommandLinePrompts.Message(doc.ToString());&lt;BR /&gt;
		&lt;BR /&gt;
		}&lt;BR /&gt;
		/// &lt;SUMMARY&gt;&lt;BR /&gt;
		/// The main entry point for the application.&lt;BR /&gt;
		/// &lt;/SUMMARY&gt;&lt;BR /&gt;
		[STAThread]&lt;BR /&gt;
		static void Main(string[] args)&lt;BR /&gt;
		{&lt;BR /&gt;
			//Application.Run(new PDF2FileName());   	&lt;BR /&gt;
		}&lt;BR /&gt;
	}&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
TIA&lt;BR /&gt;
&lt;BR /&gt;
Bill</description>
    <pubDate>Wed, 21 Sep 2005 18:29:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-09-21T18:29:53Z</dc:date>
    <item>
      <title>plot example in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/plot-example-in-c/m-p/1436087#M83784</link>
      <description>R2005:&lt;BR /&gt;
&lt;BR /&gt;
I am looking for some code examples to plot the active document.&lt;BR /&gt;
I was hoping to feed a file name during the process  to the PDF plotter (I think it's part of the Adobe distiller).&lt;BR /&gt;
I cannot do this with lisp or Vlisp.&lt;BR /&gt;
&lt;BR /&gt;
I am trying to write a .dll or command that I can use to plot each layer of a drawing as I loop through  them.&lt;BR /&gt;
&lt;BR /&gt;
I have my console application set up in VS ver.7.1.3088 but am fairly new to C# type of programming.&lt;BR /&gt;
I have done a few basic programs and tutorals and now need a shove in the right direction to do plotting.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any constructive recommendations.&lt;BR /&gt;
&lt;BR /&gt;
Bill</description>
      <pubDate>Mon, 19 Sep 2005 15:49:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/plot-example-in-c/m-p/1436087#M83784</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-19T15:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: plot example in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/plot-example-in-c/m-p/1436088#M83785</link>
      <description>Am I walking a forbodden path with this question?&lt;BR /&gt;
&lt;BR /&gt;
Or is there no information that anyone cares to share on this subject?&lt;BR /&gt;
&lt;BR /&gt;
I did many Google searches on this.&lt;BR /&gt;
&lt;BR /&gt;
I'm thinking it should be a command method using the Autodesk.AutoCAD.Interop.AcadPlot() and the ApplicationServices.Application.DocumentManager.MdiActiveDocument(); but am not adept enough yet to put it all together.&lt;BR /&gt;
&lt;BR /&gt;
I'll keep trying.&lt;BR /&gt;
&lt;BR /&gt;
Bill</description>
      <pubDate>Tue, 20 Sep 2005 13:11:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/plot-example-in-c/m-p/1436088#M83785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-20T13:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: plot example in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/plot-example-in-c/m-p/1436089#M83786</link>
      <description>Okay,&lt;BR /&gt;
I think I've made some progress.&lt;BR /&gt;
&lt;BR /&gt;
I've set doc to the active document and set the plotter configuration to the printer I want to print to.&lt;BR /&gt;
&lt;BR /&gt;
I still cannot figure out where I access plotting.&lt;BR /&gt;
Can someone tell me if I have the right resources to plot?&lt;BR /&gt;
And if so, what part of the model do I access it from?&lt;BR /&gt;
&lt;BR /&gt;
#region Using directives&lt;BR /&gt;
using System;&lt;BR /&gt;
using System.Reflection;&lt;BR /&gt;
using System.Runtime.InteropServices;&lt;BR /&gt;
using Autodesk.AutoCAD.Runtime;&lt;BR /&gt;
using Autodesk.AutoCAD.Interop.Common;&lt;BR /&gt;
using Autodesk.AutoCAD.ApplicationServices;&lt;BR /&gt;
using Autodesk.AutoCAD.PlottingServices;&lt;BR /&gt;
&lt;BR /&gt;
#endregion&lt;BR /&gt;
namespace PlotLayer2PdfFile&lt;BR /&gt;
{&lt;BR /&gt;
	/// &lt;SUMMARY&gt;&lt;BR /&gt;
	/// Summary description for Class1.&lt;BR /&gt;
	/// &lt;/SUMMARY&gt;&lt;BR /&gt;
	public class PDF2FileName&lt;BR /&gt;
	{&lt;BR /&gt;
		[CommandMethod("PlotPDF")]&lt;BR /&gt;
		public void PDF2File()&lt;BR /&gt;
		{&lt;BR /&gt;
		Document doc = Application.DocumentManager.MdiActiveDocument;			&lt;BR /&gt;
		Autodesk.AutoCAD.PlottingServices.PlotConfigManager.SetCurrentConfig("CutePDF Writer"); &lt;BR /&gt;
	   &lt;BR /&gt;
			&lt;BR /&gt;
		//CommandLinePrompts.Message(doc.ToString());&lt;BR /&gt;
		&lt;BR /&gt;
		}&lt;BR /&gt;
		/// &lt;SUMMARY&gt;&lt;BR /&gt;
		/// The main entry point for the application.&lt;BR /&gt;
		/// &lt;/SUMMARY&gt;&lt;BR /&gt;
		[STAThread]&lt;BR /&gt;
		static void Main(string[] args)&lt;BR /&gt;
		{&lt;BR /&gt;
			//Application.Run(new PDF2FileName());   	&lt;BR /&gt;
		}&lt;BR /&gt;
	}&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
TIA&lt;BR /&gt;
&lt;BR /&gt;
Bill</description>
      <pubDate>Wed, 21 Sep 2005 18:29:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/plot-example-in-c/m-p/1436089#M83786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-21T18:29:53Z</dc:date>
    </item>
  </channel>
</rss>

