AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get table drawings

6 REPLIES 6
Reply
Message 1 of 7
andre_lag
413 Views, 6 Replies

Get table drawings

hello everyone,

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.

thnx

André

6 REPLIES 6
Message 2 of 7
Gaituuth
in reply to: andre_lag

Hi André,

 

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\AutoCAD Electrical 2013\R19.0\enu\Support\User

 

regards,

 

Gerald

 

Message 3 of 7
andre_lag
in reply to: andre_lag

Hello Gerald,

Thanks for your reply,

but how can i get this in lisp enviroment?

I need this in a list, to evaluate in a lisp routine

Regards

André

  

Message 4 of 7
Gaituuth
in reply to: andre_lag

Hi André,

 

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

 

An example

 

(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.

 

good luck

 

Gerald

 

Message 5 of 7
andre_lag
in reply to: andre_lag

hello Gerald,

 

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.

thanks again

regards

André

 

Message 6 of 7
johnq
in reply to: andre_lag

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 "

 

thanks

 

Cheers  john Q

Message 7 of 7
Gaituuth
in reply to: johnq

Hi John,

 

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)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost