JollyRocker
Technical User
- May 1, 2008
- 1
Dear Tek-tips,
Welcome to my first ever post. I have dabbled in VB with Access and Excel for a while, but never within AutoCAD and I am having a problem with object handling between the two.
I have read the FAQ ( but I am trying to do this in reverse and I can't even get the FAQ to work, possibly due to version incompatabilities.
In MS Access 2002 I have 2000+ records that I have to export relevant data into a new AutoCAD 2002 drawing based on various templates that I've created (e.g. template1.dwt).
I have various database fields specifying drawing name, template to use etc, and drawing specific data such as cable numbers, equipment numbers etc.
Essentially, I would like a VB module in Access that would create a new drawing based on whatever template is specified in that record, and then recursively find and replace any matching occurrances of MText (e.g. $$jb_no$$ to "JB-26-801"). I would keep the variable name the same as the Field name but for simplicity I would avoid Attributes if possible to minimise the number of templates required and risk losing data if block is exploded.
In summary, processing a single record would be nice if/when the database record changes, but what I really need it to do is a full sweep of all records and in turn create a new drawing, replace all the text, save it, and move onto the next drawing until database EOF.
Can anybody help??
Welcome to my first ever post. I have dabbled in VB with Access and Excel for a while, but never within AutoCAD and I am having a problem with object handling between the two.
I have read the FAQ ( but I am trying to do this in reverse and I can't even get the FAQ to work, possibly due to version incompatabilities.
In MS Access 2002 I have 2000+ records that I have to export relevant data into a new AutoCAD 2002 drawing based on various templates that I've created (e.g. template1.dwt).
I have various database fields specifying drawing name, template to use etc, and drawing specific data such as cable numbers, equipment numbers etc.
Essentially, I would like a VB module in Access that would create a new drawing based on whatever template is specified in that record, and then recursively find and replace any matching occurrances of MText (e.g. $$jb_no$$ to "JB-26-801"). I would keep the variable name the same as the Field name but for simplicity I would avoid Attributes if possible to minimise the number of templates required and risk losing data if block is exploded.
In summary, processing a single record would be nice if/when the database record changes, but what I really need it to do is a full sweep of all records and in turn create a new drawing, replace all the text, save it, and move onto the next drawing until database EOF.
Can anybody help??