I have a project with more then hundred dwg's, a few of them has tables for a bill of material.
Is there a possibility to get only the file names of these dwg's from the active project with the table bill of of material?
i want to evaluate some text from that tables by lisp.
Yes it possible, you have to open the project database. In the project databases you open the table TABREPORT and FILETIME.
The field DWGIX is the field for the internal drawing name
The project databases is located in the following folder for Windows 7 -- C:\Users\%username%\AppData\Roaming\Autodesk\AutoC
AutoCAD Electrical provides several API's to perform this task.
If you go the API help of AutoCAD Electrical and look under section K - XLS and MDB tools you'll find some examples
(setq fnam (c:wd_mdb_get_proj_scratch_dbnam nil)) ; nil=active project
(setq lst (wd_oledb_select fnam (strcat
"SELECT TAGNAME,MFG,CAT,ASSYCODE FROM [COMP]"
" WHERE PAR1_CHLD2='1' AND CAT <> '' AND"
" FAMILY IN ("CR","TD")"
" ORDER BY MFG,CAT,ASSYCODE")))
If you have a copy of Access installed on your machine you can create a SQL query in here to check if the query is correct. The query in the example above will get a list of all CR and TD components that have non-blank part numbers.
thank again for your reply, search in API help and find your example.
try, and it would not work the first time but cut the code in small pieces and try again and again.
replaced piece of code FAMILY IN ("CR","TD") by (FAMILY = 'CR' OR FAMILY = 'TD') and it works.
i don't no what that piece IN ("CR","TD") means.
but the fact is , it works.
I go further with this for my solution, let you now if its finished.
G'day Gerald & Andre
I have about 15 months using ACE and I found your thread interesting.
I typed in API to the ACE help and I did not get any further.
I am using ACE2012 and I find many things different to older versions.
Just for interest can you offer any more info to expand the " help "
Cheers john Q
The API Help is a seperate section in the AutoCAD Electrical Help.
If you click on the dropdwon button near the help icon (Upper right) and then API help you should find the AutoCAD Electrical API resources. (See attached picture, In red shows the parts which I have clicked)
Start with some of our most frequented solutions to get help installing your software.
The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.