.NET

Reply
Contributor
Barry_Wheeler
Posts: 21
Registered: ‎05-02-2011
Message 1 of 5 (201 Views)

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

201 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?

 

 

Thanks,

Barry

 

 

Valued Contributor
architectOfIdeas
Posts: 75
Registered: ‎08-10-2007
Message 2 of 5 (174 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.

Board Manager
StephenPreston
Posts: 383
Registered: ‎05-22-2006
Message 3 of 5 (162 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.

 

 

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
Contributor
Barry_Wheeler
Posts: 21
Registered: ‎05-02-2011
Message 4 of 5 (140 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 :-)

 

Cheers,

Barry

Contributor
Barry_Wheeler
Posts: 21
Registered: ‎05-02-2011
Message 5 of 5 (138 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.

heers,

Barry

Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.