Home Image-Pro Automation (Macros, Apps, Reports)

How to extract Image Date/Time to milliseconds as displayed in "INFO" tab by macro

Hello:
We are utilizing legacy Image Pro Plus 4.5. to take many images.
To work up the data, we have written a macro using a combination of Image Pro macro language and VBA for windows XP.  We are having difficulty extracting date and time from the "INFO" tab of the image.  We can sort of get to this data in a way by DDE append in report, but the problems are two fold 1) When we use this method, the data appends to the bottom and we run out of space; we need to send the data to a specific column. 2) We can see the date and time this way, but it is not in a useable format(?) as it has a "#" symbol in front.

We currently get to this data by the utilizing the following code:
StrDate=objFile.DateCreated
Where StrDate is a created variable

Although this is somewhat of a workaround, I am concerned this date/time is just the associated date/time that the file was created and written to windows memory and not that associated with the "INFO" tab of the image in Image pro plus.  Further, the time associated with this information is only to the second and not millisecond as in Image Pro Plus.

Is there a way to obtain this date/time data for many, many images?
Thank you for your consideration and help.

Answers

  • edited November 7
    Hi obie,
    With legacy Image-Pro, you could use

    Dim imgDate as Long
    ret = IpDocGet(INV_DATE, DOCSEL_ACTIVE, imgDate)

    where the return parameter imgDate must be declared as a Long.  There is also a function called IpDocGetPropDate. See AutoPro help. I am not familiar with Image-Pro before version 7.0 but I guess that IpDocGet has been around since the very early days.
    Hope this helps at least a little bit.
    Regards, 
    Helga
  • Thank you helga_mayr.  We will give it a try
Sign In or Register to comment.