ExifTool Forum

ExifTool => Developers => Topic started by: QPRJohn on September 20, 2014, 03:23:17 AM

Title: How to deal with warnings from structures when sending NO values (VB.Net)
Post by: QPRJohn on September 20, 2014, 03:23:17 AM
When I want to remove values from tags in structures, by sending NO values to them (using VB.Net) several warnings are returned:-

Warning: Can't convert Licensor:LicensorTelephoneType2 (matches more than one PrintConv) (I do not get any warning for Licensor:LicensorTelephoneType1 ?)

Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ArtworkOrObjectDetails:AODateCreated (PrintConvInv)

I get no warnings from other tags in the structures when sending no values.

Two questions: -

Any advice would be appreciated, thanks.

John
Title: Re: How to deal with warnings from structures when sending NO values (VB.Net)
Post by: Phil Harvey on September 20, 2014, 08:14:10 AM
Hi John,

It sounds like you are trying to set the Licensor LicensorTelephoneType1 to an empty string when writing as a structure.  But when writing as a structure, the whole structure is written or deleted at once.  So the only way to delete a single element when writing as a structure would be to overwrite the structure with another structure that doesn't contain the element.

The easier way to delete a single element from an existing structure would be with flattened tags.

The reason you get this warning for Licensor LicensorTelephoneType2 (and you should also for LicensorTelephoneType1) and not other elements is that this is a closed choice that should take on one of a specific set of values.

To answer your questions:

1. This warning wouldn't slow things down noticeably.

2. Don't write an empty structure element.  Or if you really want to write an empty element to a closed choice like this, use the -n option.

- Phil