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: 

Lisp routine wd_import_scratch_mdb_doit

0 REPLIES 0
Reply
Message 1 of 1
DRnorris7411
412 Views, 0 Replies

Lisp routine wd_import_scratch_mdb_doit

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?

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report

”Boost