
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear all,
I recently started to get accustomed with Autocad, so not all references are familiar.
I have an excel sheet which contains PLC Controller Address Data that needs to get in a Autocad Drawing.
I am using OLE objects so once I open my drawing this information is automatically updated when parameters in my Excel File are adjusted. Then I press "Plot" to plot this drawing to PDF.
So far all is working as expected.
Unfortunate I have between 500 and 1200 drawings I need to plot this way for each project, so I want to automate this process using VBA. I am using Excel as my master VBA project, because I can easily update the parameters for the next drawing within this document.
I am able to open Autocad, open the first drawing, make it plot. And this works.
The problem comes when I update my parameters and open the second drawing (which can be the same source file or a different one) and make it plot again, nothing happens.
I noticed this is probably due to, that I can only plot 1 drawing at a time and my VBA script does not wait on this.
Because when I step through the code and wait for the plot job to finish it does work.
I attached my testing code with 4 files as a reference. (Once I get these 4 working I can go to bigger projects)
What would be the correct way to do this.
Or should I look in a different direction. (VBA in Autocad/AutoLISP)
- I already tried "Tables" but these do not update if I do not save my excel sheet,
and this still does not solved the 1 drawing per plot isseu.
Thank you for any advise that may come.
Regard Peter
Solved! Go to Solution.