CoCreate User Forum  

Go Back   CoCreate User Forum > Applications > Data Management

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 02-19-2003, 02:46 AM
Klaus Klaus is offline
Registered User
 
Join Date: Oct 2002
Location: Denmark
Posts: 9
Transfer info to WM from OSDM

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. ?
__________________
Best Regards

Klaus
Reply With Quote
  #2  
Old 02-20-2003, 03:23 AM
ChrisE's Avatar
ChrisE ChrisE is offline
OneSpace Member
 
Join Date: Oct 2002
Location: Grünstadt, Pfalz, Germany
Posts: 121
Hi Klaus,

it is a bit tricky, and maybe not the official way of doing it :

- 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

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)

Last edited by ChrisE; 02-20-2003 at 03:27 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:01 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.