Set Property to Attribute
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-11
11:19 AM
- last edited on
2021-09-15
11:48 AM
by
Noemi Balogh
2020-06-11
11:19 AM
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
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
Labels:
- Labels:
-
Add-On (C++)
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-11 12:03 PM
2020-06-11
12:03 PM
What errors (if any) are returned by these calls?
Ralph Wessel BArch
Central Innovation
Central Innovation
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-11 02:53 PM
2020-06-11
02:53 PM
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.
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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-06-11 03:22 PM
2020-06-11
03:22 PM
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 onACAPI_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.
I can't comment on
Ralph Wessel BArch
Central Innovation
Central Innovation