What is the correct way to call ContainsCustomIcon?
Answered
Hello,
In a macro I have the following code
For Each m_icon In m_topic.AllIcons Debug.Print m_icon.Name NextAnd the output is
CustomIcon--717189169
Now I'm trying to query whether this icon is included
If m_topic.AllIcons.ContainsCustomIcon("CustomIcon--717189169") Then Debug.Print "yes" Else Debug.Print "no" End IfI always get a "no" no matter what text I pass (just the number, the icon file name, ...)
What do I really have to enter?
Thank you for your help!
Frank
Hello Frank. Custom icons are identified by a signature which can be calculated from an icon file. The icon name returns the icon base filename, which is different to the custom icon signature. Once a custom icon has been used in a map, the signature does not change, so it need be calculated only once.
The method for getting the custom icon signature is
Utilities.GetCustomIconSignature(filename)
Hello Frank. Custom icons are identified by a signature which can be calculated from an icon file. The icon name returns the icon base filename, which is different to the custom icon signature. Once a custom icon has been used in a map, the signature does not change, so it need be calculated only once.
The method for getting the custom icon signature is
Utilities.GetCustomIconSignature(filename)
---