Forgot password? | Forgot username? | Register

Scripting image insert

Scripting image insert

Hi all,

I'm trying to batch insert and link images into EMu without using the Import tool (foolish maybe).  I've resingned myself to the fact that the APIs will not allow the insertion of multimedia in the same way that Import tool does it (understandably).  However, after reading through the help file and some experimenting I thought there might be a way around this.  If I created a multimedia record without attaching a multimedia resource to the record and then created the required folders in the multimedia directory based on the record's IRN and upload the image to the folder.

All of this "works" except for EMu knowing that multimedia exists in that directory.  I'm assuming that it is because the MulHasMultimedia column is still set to "No".  If this is the case, it is unfortunate because I'm unable to manually change this.  I've tried passing update statements  using the API but it is still set to "No".  From reading the help file it seems that when a multimedia record is opened EMu should automatically scan all of the paths in the ServerMediaPath registry settings looking for the folders that match the records IRN.  Or does that only happen if the HasMulMultimedia column is "Yes"?  Do anyone know of some method for updating this column without manually adding a multimedia resource?  Or some other way to "force" EMu to look for these folders in the multimedia directory? I understand that by going down this route I'm skipping a lot of the processing and validation that images would normally pass through (resolution generations, metadata extraction etc.) but I'm willing to give that up for being able to do this in one  pass assuming it doesn't break anything.

If it really isn't possible my backup plan is to just create all of the multimedia records using the APIs and then use the import tool to add the multimedia resources and then go back and use the APIs to link all of the multimedia records to their corresponding catalog records. 

Thanks,
Scott

Scott Williams
Database Administrator
useravatar
Offline
15 Posts
Male 
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Scripting image insert

Hi Scott,

For EMu to recognise and know the path of the multimedia file, the MulDocumentType field needs to be set to "M" and the multimedia filename needs to be inserted into the MulIdentifier field. What happens then in the background when the Multimedia record is created, the Multimedia field will be calculated automatically to include the split multimedia IRN followed by the identifier (e.g. 0/032/test.jpg) and the MulHasMultimedia field will be automatically set to "Y".

Regards,
Helena

Helena Sukmawijaya
KE Software (Melbourne)
www.kesoftware.com

Helena Sukmawijaya (Axiell Sydney)
useravatar
Offline
8 Posts
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Scripting image insert

Thanks Helena!  When I referenced creating the multimedia record I was providing MulMimeType, MulIdentifier, MulMimeFormat and MulDescription and MulHasMultimedia but including MulDocumentType solves the problem. 

Thanks again
Scott

Scott Williams
Database Administrator
useravatar
Offline
15 Posts
Male 
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests and 0 other users also viewing this topic

Board Info

Board Stats
 
Total Topics:
601
Total Polls:
0
Total Posts:
1362
User Info
 
Total Users:
827
Newest User:
Marcus Swann (Axiell Melbourne)
Members Online:
0
Guests Online:
131

Online: 
There are no members online