PDA

View Full Version : export entire class


MikeBoswell
10-19-2005, 06:16 AM
I would like to export an entire class of drawings out of designdatamanager.
Anyone have a macro for this?

Thanks,
Mike

MikeBoswell
10-21-2005, 05:48 AM
all set thanks.

bobwing
12-29-2005, 12:43 PM
I am also interested in the above question. Did you get a reply?

MikeBoswell
12-30-2005, 07:09 AM
Bob,

It went something like this:

using sqlplus and writing out to /leg_data/list_of_pdf_bulk_elid: (this file needed some cleanup prior to using as input for WM macro)
SELECT Wm_files.ELID FROM Wm_Files, Drawing_PDF, Wm_Elements WHERE (Wm_Elements.Elid=Wm_Files.Elid AND Wm_Elements.Infos=Drawing_PDF.Infos);

And then in workmanager, ran below toggle_packet_requirement and bulk_export

{********************************************************************************}
{**************** TAKES a list of elid and copies each from the DB* **********}
{********************************************************************************}

DEFINE bulk_export
OPEN_INFILE 1 "/leg_data/list_of_pdf_bulk_elid"
TRAP_ERROR
IF (CHECK_ERROR)
DISPLAY ('cant open')
CANCEL
END_IF

LOOP
READ_FILE 1 Elid
EXIT_IF (Elid='END-OF-FILE')
LET Doc_cid Dms_filter_errors ( DMS_SELECT_ELEMENT VIEW Elid )
LET Doc_elid (GET_CACHE_VALUE Doc_cid Db_elid)
LET File_ltab (DMS_LOAD_FILE Doc_cid)
LET File_cid (READ_LTAB File_ltab 1 Db_cacheid)
LET File_id (GET_CACHE_VALUE File_cid Db_fid)
Dms_check_errors(DMS_COPY_FROM_DB File_id DEL_OLD '.')
TRAP_ERROR
IF (CHECK_ERROR)
DISPLAY ('cant open'+Elid)
END_IF

END_LOOP
CLOSE_FILE 1

END_DEFINE

{********************************************************************************}

DEFINE toggle_packet_requirement {204}

LET current_policy (TOGGLE_PACKET_POLICY)

END_DEFINE {toggle_packet_requirement}


toggle_packet_requirement


Mike