What you need is a user defined type array. First declare the user defined type.
type t_objData
objNum as integer
objName as string
imgNum as integer
endtype
Since this is for a 3D Editor, you may want to be able to add and delete objects. For this the array will need to be dynamic. Next dimension an empty array of your user defined type. DBPro has a whole set of functions to add and delete array elements.
dim objData() as t_objData
The down side to this is you will need to write functions to access the array index to the values needed. This function will return the necessary index using the object number.
` Return the array index if object number is found in the array.
` Return -1 if object number is not found in the array.
` Check to be sure the value returned is not equal to -1
` before using the value returned to index the array.
function FindArrayIndexFromObjectNumber(objNum as integer)
local i as integer
local index as integer
local arrelem as integer
index = -1
arrelem = array count(objData())
for i=0 to arrelem
if (objData(i).objNum=objNum)
index = i
exit
endif
next i
endfunction index
If you need any more help, don’t hesitate to ask.