Posts: 15
Registered: ‎05-02-2011
Message 1 of 5 (147 Views)

Select, Re-gen and Plot (by PDF) Code

147 Views, 4 Replies
12-09-2013 02:34 PM

This is my first time posting here, therefore please forgive my 'newby-ism'.


I was at Autodesk University and took the VB.net course (total = 1.5 hours). After the session I asked one of the course assistants about finding code and he suggested this forum.


I am looking for pieces of the portions stated in the command line.

Once all is pieced together, the routine will allow the user to select .dwg files from one or more folders, call them up, do a REGEN ALL in modelspace and paperspace, and then run the plot command by the default printer (we normally use a PDF generator).


The reason for this is we have drawings that ocntain large raster images combined with both CAD data and connected (i.e. shapefiles) data. The figures lose their draworder and using a batch such as within a sheetset manager does not rememdy this befor eit creates batched PDFs.


Can anybody point me in the direction fo some of this code for me to toy with until I get a complete working routine?







Valued Contributor
Posts: 72
Registered: ‎08-10-2007
Message 2 of 5 (120 Views)

Re: Select, Re-gen and Plot (by PDF) Code

12-10-2013 08:20 AM in reply to: barry_wheeler

Welcome! How was the course?


I'm assuming the 1.5 hours gave you a very brief idea of how to set up Visual Studio Express and ObjectARX and define a custom command, yeah?


Do you know where all your resources are for looking up information? This is definitely one place, but there are many more.


Be sure to check out Autodesk Exchange for AutoCAD Developer Reference, the MSDN Library for .NET language reference and of course know where your ObjectARX help files are!


To open files, check this out.


To regen a drawing, check this out.


And to plot drawings, check this out.

ADN Support Specialist
Posts: 349
Registered: ‎05-22-2006
Message 3 of 5 (108 Views)

Re: Select, Re-gen and Plot (by PDF) Code

12-10-2013 12:51 PM in reply to: barry_wheeler

If you want a robust batch plotting routine, I suggest you have a look at the ADN Plugin of the Month "Batch Publish" sample, which includes source c ode. Here is the original announcement for that sample: http://through-the-interface.typepad.com/through_the_interface/2010/03/marchs-plugin-of-the-month-li... Many people make the mistake of assuming that a batch process will never crash - this sample shows you how to program defensively.


BTW Don't forget to check the learning resources available at www.autodesk.com/developautocad to help you get up to speed.






Stephen Preston
Autodesk Developer Network
Posts: 15
Registered: ‎05-02-2011
Message 4 of 5 (86 Views)

Re: Select, Re-gen and Plot (by PDF) Code

12-13-2013 02:01 PM in reply to: architectOfIdeas

Thanks for the response.


The course was good but it was barely an appetizer. We did learn how to open/start a project and to load Autocad Resources. We did write (copy?) some code for some basic functions and then create .dll files. We also stepped through the process of loading and running the files in Autocad products.


The links you provided are excellent and what I was seeking. I will now try to join them in to one file and make it work for its overall use once I get a little time. I expect to stumble along the way but that is the learning process :-)




Posts: 15
Registered: ‎05-02-2011
Message 5 of 5 (84 Views)

Re: Select, Re-gen and Plot (by PDF) Code

12-13-2013 02:02 PM in reply to: StephenPreston

Hi Stephen,

Thank you for the links and advice. I understand I am on a steep learning curve and may be back with some troubleshooting questions.



You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community