The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy

By n.mihaylov
#288627
Hi guys,

How can I find, if possible, the definition of ACAPI_Property_CreatePropertyDefinition? I modified Element_Test example to have a menu command to open a text file and import the settings but I got a crash in this function :(
crash.jpg
#288628
Hi,

Could you show me please the definition of your PropertyTestHelpers::CreateProperty function?
I think a little mistake in that function causes the crash.

The definitions of ACAPI functions are inside ARCHICAD, so they are not public.

Regards,
Tibor
By n.mihaylov
#288629
Here it is, and is working on Mac:

API_PropertyDefinition PropertyTestHelpers::CreateProperty (API_PropertyGroup group, const char * name)
{
API_PropertyDefinition definition;
definition.guid = APINULLGuid;
definition.groupGuid = group.guid;

GS::UniString uniName (name, CC_UTF8);
definition.name = uniName;

definition.description = "Custom property set by ArchiCADImporter";
definition.collectionType = API_PropertySingleCollectionType;
definition.valueType = API_PropertyStringValueType;
definition.defaultValue.singleVariant.variant.type = definition.valueType;
return definition;
}
User avatar
By dfintha
#289577
Hello,

Could you please provide some example strings, that are used as names for the Property Definitions?
I could not reproduce the same issue yet.

Best regards,
Dénes