Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Set Property to Attribute

Anonymous
Not applicable
We are currently developping an addons for Archicad. However, we have still issues despite the documentation and examples.
Our issues:
1- Property Group: We cannot create new Property Group even if it's working with the addon example Property_Test
API_PropertyGroup group;
group.guid = APINULLGuid;
group.name = "datBIM" + GenerateUniqueName();
ACAPI_Property_CreatePropertyGroup(group); => Not Working
2- Attribute Property: We cannot create new Property for Attributes with ACAPI_Attribute_SetProperty(attrib.header, property); even if it's working with Elements with ACAPI_ElementList_AddProperty(definition, guidList);

Thank you for your help
3 REPLIES 3

Ralph Wessel
Mentor
What errors (if any) are returned by these calls?
Ralph Wessel BArch

Anonymous
Not applicable
I have the following errors:
1/ ACAPI_Property_CreatePropertyGroup return => APIERR_NEEDSUNDOSCOPE even if we use ACAPI_CallUndoableCommand in __ACENV_CALL MenuCommandHandler
2/ ACAPI_Attribute_SetProperty return => APIERR_BADID (same process than TestPropertiesOnAttribute () in Property_Test, the Building Materials are successfully created but it is not possible to add them properties)

Our project is based on the Browser_Control project.

Thank you.

Ralph Wessel
Mentor
Are you certain ACAPI_Property_CreatePropertyGroup is called within the scope of ACAPI_CallUndoableCommand? The error strongly suggests it isn't - we use this function successfully in a number of add-ons.

I can't comment on ACAPI_Attribute_SetProperty – we haven't used it for anything yet. I have some recollection that properties attached to attributes are still limited compared to elements, but I can't remember the specifics.
Ralph Wessel BArch

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!