Archicad C++ API
About Archicad add-on development using the C++ API.

How to add Add-On version info?

Anonymous
Not applicable
I was add version info next way:
Add -> Resource -> Version -> New
and now ArchiCAD set next info for Add-On

"The file is either not an Add-On or an outdated one that cannot be used with this ArchiCAD version."

How I must to specify version info correct?

Thanks
6 REPLIES 6
Karl Ottenstein
Moderator
If you look at the examples, the version info is usually included in the *Fix.grc file:
/*	Version resource - uses strings defined in the localizable resource file
'VERS' {
	"Your Company"
	"Copyright  © Your Company 2008"
	"Your Add-On"
	1.00
	1.00
	"ArchiCAD"
	12.0
	" (12)"
}
*/
Above, it says 'uses strings defined in the localizable resource file', but in fact, if you remove the comment marks, the syntax above is for defining the entire VERS resource right there.

For example, I had an add-on with this in the fixed grc:
'VERS' {
	COMPANY_STR
	COPYRIGHT_STR
	FILEDESC_STR
	1.20
	1.20
	"ArchiCAD"
	9.0
}
where I defined the macros in the localized grc:
@#define	COMPANY_STR		"Archispectives LLC"
@#define	COPYRIGHT_STR	"Copyright © Archispectives LLC 2004"
@#define	FILEDESC_STR	"Provides shortcut key access to individual display options."
The idea of the localized resource file for defining the strings is simply for easier translation for muli-language versions.


Not sure if that's what you're asking?

Cheers,
Karl
One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Ralph Wessel
Mentor
equilibrium wrote:
"The file is either not an Add-On or an outdated one that cannot be used with this ArchiCAD version."
How I must to specify version info correct?
Karl has given all the correct steps for adding version info, but I suspect you are trying to overcome the failure of ArchiCAD loading the add-on.

There are many possible reasons for this error appearing:
  • - The developer and add-on ID resources (MDID) are missing.
    - The required add-on functions are missing.
    - The add-on is built with the wrong compiler, e.g. using VS 2008 when the devkit requires VS 2005.
    - Linking against conflicting runtime libraries.
    - Dynamic linking failure
I recommend building one of the example projects using the compiler etc that you have used for this add-on to ensure it works. If it does, check your MDID resources carefully. If that also fails, check anything you link against for possible incompatibilities.
Ralph Wessel BArch
Anonymous
Not applicable
Thanks a lot, Karl and Ralph!

I was successfully uncomment version settings in *Fix.grc file and build my Add-On. I used also information from next topic for fix problem with 'undefined keyword or key name: WIN_LANGUAGE_ID'.

But I have next question.
My Add-On version is number like '%d.%d.%d.%d' (four digits separated with points), but i can specify only '%d.%d' number.

How can I change format of file version?

Thanks
Anonymous
Not applicable
hi,

I have another question: How do I add the info to the properties of .apx file? I'm on Windows and all the add-ons I've found on internet has it.

thanks

Santi
Ralph Wessel
Mentor
santi wrote:
I have another question: How do I add the info to the properties of .apx file? I'm on Windows and all the add-ons I've found on internet has it.
Just include the version resource as Karl described above.
Ralph Wessel BArch
Anonymous
Not applicable
Ralph wrote:
santi wrote:
I have another question: How do I add the info to the properties of .apx file? I'm on Windows and all the add-ons I've found on internet has it.
Just include the version resource as Karl described above.
I didnt realize that it was commented out thanks a lot