Permlink Replies: 3 - Last Post: Oct 29, 2009 8:27 PM Last Post By: Pat Murnen \(Au... Threads: [ Previous | Next ]
pjfontes

Posts: 70
Registered: 03/17/08
wd_import_scratch_mdb_doit API call - Example please!
Posted: Oct 28, 2009 3:47 PM
  Click to reply to this thread Reply
I'm trying to take advantge of the wd_import_scratch_mdb_doit API call but can't get it to work.



This is what I've tried so far...

(c:wd_import_scratch_mdb_doit "PathAndFilename.mdb" (list "*") (list "COMP" "TERMS" "PNLCOMP") 0)



I'm confused with the dwgix argument. I want to update all drawings/all tables.



Anyone?? :)
Pat Murnen \(Au...
Re: wd_import_scratch_mdb_doit API call - Example please!
Posted: Oct 29, 2009 3:28 PM   in response to: pjfontes in response to: pjfontes
  Click to reply to this thread Reply


The syntax is

(c:wd_import_scratch_mdb_doit fnam dwgix table_lst
options)

 







Parameters 


Description 



fnam 


Full path name of AcadE project database file (nil =
active proj). 



dwgix 


The "DWGIX" field in the target table(s) to identify
which records go with the current dwg (the DWGIX field value in FILETIME
table). 



table_lst 


List of tables to process, ex: (list "COMP" "TERMS"
"PNLCOMP"). 



options 


For future use (set to
0). 

 

When the fnam is input use  "/" rather than
"\" in the path.

 

The dwgix is the number in the project database
assigned to the drawing you want to process. So you want the dwgix for the
active drawing. I believe you can get it with these API calls.

 

(wd_mdb_wdp2ix_ix
(c:wd_is_cur_dwg_in_proj))

 

(c:wd_is_cur_dwg_in_proj) returns hte active
drawing's place in the project. (wd_mdb_wdp2ix_ix position) takes that place and
finds the dwgix from the project database. So here is an example.

 


(c:wd_import_scratch_mdb_doit "c:/my path/my
project.mdb" (wd_mdb_wdp2ix_ix (c:wd_is_cur_dwg_in_proj))
(list "COMP" "TERMS" "PNLCOMP")
0
)

 

Pat Murnen

 


<pjfontes> wrote in message news:6279730@discussion.autodesk.com...
I'm
trying to take advantge of the wd_import_scratch_mdb_doit API call but can't
get it to work.

This is what I've tried so
far...
(c:wd_import_scratch_mdb_doit "PathAndFilename.mdb" (list
"*") (list "COMP" "TERMS" "PNLCOMP") 0)

I'm confused with the
dwgix argument. I want to update all drawings/all
tables.

Anyone?? :)

pjfontes

Posts: 70
Registered: 03/17/08
Re: wd_import_scratch_mdb_doit API call - Example please!
Posted: Oct 29, 2009 5:40 PM   in response to: Pat Murnen \(Au... in response to: Pat Murnen \(Au...
  Click to reply to this thread Reply
I guess this API call only updates 1 dwg at a time?

"(c:wd_import_scratch_mdb_doit "c:/my path/my
project.mdb" (wd_mdb_wdp2ix_ix (c:wd_is_cur_dwg_in_proj))
(list "COMP" "TERMS" "PNLCOMP")
0)"

Thanks again Pat. I'll see if I can make something happen with this code.
Pat Murnen \(Au...
Re: wd_import_scratch_mdb_doit API call - Example please!
Posted: Oct 29, 2009 8:27 PM   in response to: pjfontes in response to: pjfontes
  Click to reply to this thread Reply
Right, this can only work on the active drawing. You could put it in a lisp
function if there was more than just this one line. Then you could put this
line or the lisp call in a script. The script could have just the one call
in it or whatever you wanted to perform on each drawing.. Then you could use
the project-wide utilities to run the script on a project set.

Pat Murnen

wrote in message news:6280581@discussion.autodesk.com...
I guess this API call only updates 1 dwg at a time?

"(c:wd_import_scratch_mdb_doit "c:/my path/my
project.mdb" (wd_mdb_wdp2ix_ix (c:wd_is_cur_dwg_in_proj))
(list "COMP" "TERMS" "PNLCOMP")
0)"

Thanks again Pat. I'll see if I can make something happen with this code.