LittleJohn
26th April 2005, 07:34
Hi,
Is there a standard dll to convert quantity between units ?
This is in Baan Vc.

I searched an earlier post and found one for the dll tiitmdll0003 to convert a quantity between units... I guess this is in Baan IV.
http://www.baanboard.com/baanboard/showthread.php?t=22531

Can someone please provide an example.
Thank you in advance

Regards
LittleJohn

vahdani
26th April 2005, 11:32
Hi,

the function call in Baan V is:
conversion.factor = tcibd.dll0003.conv.factor( item, item.group,
base.unit, target.unit)

here is the DllUsage (a bit confusing as project and item are no longer separate as in Baan IV but are seqments of item code!):

DllUsage
Expl.: For a given (customized) item the conversion factor is returned.
On three levels the conversion can be present. This routine
will search as follows:
1. item level
2. itemgroup level
3. general level
Input: - project (mandatory if it concerns a customized item)
- itemcode (mandatory if you want to search on item level)
- itemgroup (not mandatory but it will speed up things)
- base unit (not mandatory but it will speed up things,
mandatory if you don't fill in itemcode)
- Unit (mandatory)
If you don't specify itemgroup or base unit this routine will
read these fields from the item table or unit/parameter table.
- Other available arguments:
Number of args | Meaning
---------------+-------------------------------------------
5 | arg. 6 will be assumed to be true.
6 | When no conv. factor has been found and this
| flag = true; '0' will be returned else '1'
11 | arg. 6 - 11 : all record fields (tcibd003) are
| returned; in sequence : item,
| citg, basu, cuni, conv.factor, rpow.
12 | arg. 6 -11 are the same as above.
| arg. 12 has the same meaning as argument '6'
Output: 0 if no factor is found else the conv. has been found.
EndDllUsage

LittleJohn
27th April 2005, 07:33
Thanks a lot vahdani. Appreciate your help.