AutoCAD Electrical General Discussion

Reply
Valued Contributor
andre_lag
Posts: 69
Registered: ‎09-12-2008
Message 1 of 7 (234 Views)

Get table drawings

234 Views, 6 Replies
08-04-2012 09:17 AM

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é

Distinguished Contributor
Gaituuth
Posts: 168
Registered: ‎10-28-2005
Message 2 of 7 (201 Views)

Re: Get table drawings

08-07-2012 12:03 AM 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

 

Valued Contributor
andre_lag
Posts: 69
Registered: ‎09-12-2008
Message 3 of 7 (185 Views)

Re: Get table drawings

08-07-2012 08:50 AM 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é

  

Distinguished Contributor
Gaituuth
Posts: 168
Registered: ‎10-28-2005
Message 4 of 7 (168 Views)

Re: Get table drawings

08-08-2012 12:04 AM 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

 

Valued Contributor
andre_lag
Posts: 69
Registered: ‎09-12-2008
Message 5 of 7 (149 Views)

Re: Get table drawings

08-08-2012 10:50 AM 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é

 

Mentor
johnq
Posts: 219
Registered: ‎05-24-2011
Message 6 of 7 (131 Views)

Re: Get table drawings

08-08-2012 10:45 PM 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

Distinguished Contributor
Gaituuth
Posts: 168
Registered: ‎10-28-2005
Message 7 of 7 (124 Views)

Re: Get table drawings

08-09-2012 12:09 AM 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)

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New AutoCAD Electrical Category!

The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.

Ask the Community