The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
I am writing a plugin for Creo which adds two user-created commands to Creo. I would like to add an icon to these and have run into a number of issues.
First, even though the API flat out says that PTC recommends you use .pngs, only .gifs are accepted. I've simply converted to .gif, but it certainly indicates a general problem with the ProCmdIconSet function.
The REAL problem I'm having is that when I try to add a .gif file as an icon which ISN'T in the Creo directory, the function returns a PRO_TK_GENERAL_ERROR. I simply give the file name, "plugin_icon.gif", as argument and rely on the function to find it. The API claims that it searches for the icon in "Application text dir/resource". In my protk.dat file I set the text dir with the "TEXT_DIR" command. In fact, I know that Creo accepts this, as it loads the text file which I pass to ProMessageDisplay just fine.
The thing is, if I set the text directory to the internal text directory (Common Files/F000/text, for instance), the images load just fine (unless they're a .png).
Does anyone have any experience in using icons external to the Creo directory structure?
That solved it. Thanks a lot, Patrick!
So it seems the TEXT_DIR command points to the folder containing the text dir, rather than the text dir itself.
I am also trying to use this command - We didn't use icons on our menu buttons previously, but with the Creo 1 ribbon bar we really need to!
However, although I can set an icon to a .gif file, it doesn't appear to take any account of the sizes. - The help suggests that it will 'automatically' use a file named "about_large.gif" for the 32x32 size icon and "about.gif" for the 16x16 icon, if the command is set to use "about.gif".
Has anyone got this to work? - The 16x16 being scaled up looks very poor and the 32x32 scaled down doesn't look any better either!
Thanks,
Chris.