View Full Version : Transfer info to WM from OSDM
Klaus
02-19-2003, 02:46 AM
I want to send info to WM from OSDM.
The issue is how i can send it to WM. I can easyli get/calculate it in lisp. or make an attribute on a part. But how i tranfer it, is the problem.
Maybe a temporary file for tranfering, is the solution.
How do you do it ?
Example
In OSDM
Attach an marterial
ask volume
calculate weight
(the problem) Send weight to WM att.
I have to register an part att. ?
ChrisE
02-20-2003, 03:23 AM
Hi Klaus,
it is a bit tricky, and maybe not the official way of doing it :D :
- every SD part handled by WM has some info-strings (attributes) attached, the one refering to the WM Partdesc is named "DB-PREF". If you make a dump of the attributes of such a SD part stored into WM as "part and document", you will see all database attributes along with their values attached as attributes (as property lists)
- So if you are to add additional information to the database via the AIP, you have to extend the value list of "DB-PREF" by your attribute names and values (like e.g. :WEIGHT 12.5)
- In WM, you need to have an attribute named e.g. WEIGHT in your part class
- You have to extend the AIP macros to take care of your additional attributes like WEIGHT:
Look e.g. at the macro Awmc_sd_pa_dlg_store_model_sd_npart.
Before calling Awm_sd_pa_dlg_store_model_sd_npart, you should patch the part data ltab.
- From the desc_ltab, you can extract the name of your part data ltab (the one containing your WEIGHT attribute) (see code below)
- Make sure to set row 2 of your attribute's column to 1, so the value you supplied (stored in row 1) will be written to the database without further confirmation.
Hope this helps.
Good luck!
Chris :cool:
P.S.
Use the following commands to access the name of your part data ltab:
LET Win (GET_CURRENT_WINDOW)
LET Desc_ltab (READ_FIELD_VALUE
(Win+".StoreSD.Local.DescLtab"))
LET Top_id (READ_FIELD_VALUE (Win+".StoreSD.Local.SdObjID"))
Awm_sd_m_get_obj_row Desc_ltab Top_id
LET Row_num Dms_return_val
LET l_part_Ltab (Awm_sd_f_read_desc_partcsl Desc_ltab Row_num)
vBulletin® v3.8.4, Copyright ©2000-2024, Jelsoft Enterprises Ltd.