Graphisoft®

File Type ManagerVersion: 1.0

Matching Precedence

The file identifying methods of the FileTypeManager (Identify, IdentifyOwn, ExactMatch, ExactMatchOwn, Match, MatchOwn) use the same algorithm for the relation operator between type item matches on a file object. The result can be: "A" type matches better to a file than "B" type, or "A" type matches equally to a file with "B" type, or "B" type matches better to a file than "A" type. There are three properties of a FileType that determine the result. These properties have a precedence order. The three properties in the order of precedence are extension, mac type and read-in function ("magic" number of the file).  The precedence means that a match level number can be assigned to each comparison between a file and a file type.

 

Match
level
Extension
match
Mac Type
match
Callback
match
8 yes yes yes
7 yes yes no
6 yes no yes
5 yes no no
4 no yes yes
3 no yes no
2 no no yes
1 no no no

 

If there is a plan file named "Archicad 7.0.pln" which has a mac type 'DOS ' will be a be a match level 6 to a type with the following parameters "pln", 'HOUS', but only 3 to a type with "", 'DOS '. The plan file named "Archicad 7.0" with a mac type 'HOUS' will have a match level 4 and the same file with mac type 'DOS ' will have match level 2 to a type with "pln", 'HOUS' and the right callback function.

Note that all identifying methods are limited to match level 3, so if neither the extension nor the mac type matches it will not call each callback to decide between level 1 and 2.

See Also

File Type Manager, FileTypeManager class, FileType class