AutoCAD Electrical General Discussion

AutoCAD Electrical General Discussion

Reply
New Member
DRnorris7411
Posts: 1
Registered: ‎10-02-2012
Message 1 of 1 (163 Views)

Lisp routine wd_import_scratch_mdb_doit

163 Views, 0 Replies
10-02-2012 02:21 PM

I would like to import infomation from a table in the scratch mdb which is not on the list of table choices when you execute AEIMPORTDB (from the menu or icon). I found the wd_import_scratch_mdb_doit routine in the documentation and wrote the following code to test it:

 

;;; **** This code assumes the current drawing is the first drawing in the active project  ****

;;; **** and reads data only from the table BLOCK_ATTR  ****

 

(defun c:db_upd ( / fnam tbl_lst hdl idx)

      (setq tbl_lst (list "BLOCK_ATTR"))
        (setq idx "1")

 


  (setq fnam (c:wd_mdb_get_proj_scratch_dbnam nil)) ; "nil"=get current proj mdb file name

  (setq hdl (wd_mdb_GetHandle 1)) ; get next handle, MDB format
      (if hdl
        (progn
          (if (wd_mdb_Open hdl fnam) ; open current project's mdb file
            (progn
              ; import new data from scratch db fnam = scratch db name, idx=dwg index within prj,

              ; tbl_lst= a list of tables from which to import data
             (c:wd_import_scratch_mdb_doit fnam idx tbl_lst 0)

         )
       )
     )
       )
 
      (wd_mdb_Close hdl)
      (setq hdl nil)

)

 

This code did not error but reports no mismatches found even though I have changed the scratch db. Is there another step to force the new entries in the scratch db into my drawing?

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.