License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Archicad C++ API
About Archicad add-on development using the C++ API.

Proper way of adding a property value to single attribute

Anonymous
Not applicable
Hello again,

I'm struggling with the following situation:

1. I create a new group and new string property which I will use to put website url in it.

2. I create a new building material and make the new property available for it.

3. ( This is the problem step ) I want to assign the url value to that new building material which I created.

I'm reading about the ACAPI_​Element_​SetProperties(), which sets the properties, but the first parameter is elemGuid, which is not the building material guid, because when I try to pass it I get this error: The passed identifier is not a valid one, or valid, but not proper for the given operation.

So what's the proper way to set the property value to a particular building material ?

Thanks in advance, Julian
4 REPLIES 4
Anonymous
Not applicable
As far as my understanding goes the new property is set for the whole group in which belongs the new attribute which I created. Is there any way that I could set a different default value for each new attribute, before the element is even created ?
Ralph Wessel
Mentor
jcimentarov wrote:
3. ( This is the problem step ) I want to assign the url value to that new building material which I created.
I'm reading about the ACAPI_​Element_​SetProperties(), which sets the properties, but the first parameter is elemGuid, which is not the building material guid, because when I try to pass it I get this error: The passed identifier is not a valid one, or valid, but not proper for the given operation.
I might be misunderstanding, but are you trying to add properties to a building material? If so, that isn't currently supported – properties can only be assigned to elements (hence the command name ACAPI_​Element_​SetProperties).
Ralph Wessel BArch
Software Engineer Speckle Systems
Akos Somorjai
Graphisoft
Graphisoft
Ralph wrote:
I might be misunderstanding, but are you trying to add properties to a building material? If so, that isn't currently supported – properties can only be assigned to elements (hence the command name ACAPI_​Element_​SetProperties).
Ralph is right, properties are not available (yet ) for attributes.

You can solve this for the current version by adding your own data to the attributes (ACAPI_Attribute_SetUserData ()) and provide your own UI for that (ACAPI_Register_AttributePanel ()).

Best, Akos
Anonymous
Not applicable
Akos wrote:
Ralph is right, properties are not available (yet ) for attributes.
Favorite teaser, really looking forward to properties on EVERYTHING, including stories, fills, pens and layouts. Basically replacing whatever scheme or text driven information field across ArchiCAD