%GetObjTechUnit function


Function
The function returns the technical units of the object specified  by its unique identifier (HOBJ).


Declaration
TEXT %GetObjTechUnit(
   HBJ in objID
 )
Parameters
objIDValue of HBJ or INT types.
Description
The function sends a query to the D2000 Server process to detect the technical units of the D2000 system object defined by the parameter objID. If the object doesn't exist or the parameter is an invalid value, the function returns invalid value.
Example
 INT _hbj
 TEXT _techUnit
 
 ; HOBJ of the object U.TestTechUnit
 _hbj := %StrToHBJ("U.TestTechUnit")
 
 _techUnit := %GetObjTechUnit(_hbj)    ; variable _techUnit will contain the technical units of U.TestTechUnit
 
 ; object probably doesn't exist => _techUnit will be invalid value
 _techUnit := %GetObjTechUnit(928374)
Napíšte komentár