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.
SOLVED!

Property Test Add-on issues on german version of AC22

Anonymous
Not applicable
Hello,

I have some issues with the german version of AC22 and the property test add-on.

The problem is that when a draw a basic wall, then select it and try test -> properties -> define string custom property for selected element ( none of the first three options work ! ) i get the error from the screenshot ( see below )

On the Archicad 22 INT version i do the same steps and the property is set to the element without any error.

I would be thankful if you could explain why this happens
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi,

Each kind of property is available for only elements with a specific classifications.
In Property Manager if you select a Property, then you can check the list "Availability for Classifications".
Therefore an unclassified element cannot have properties. I bet your wall is unclassified and that causes the issue.

Property Test Add-On function tries to create a new property and makes it available for the classifications of the selected element. But if your element is unclassified, then the created property will be available for none and cannot be set for the selected element. The error code APIERR_BADPROPERTYFORELEMENT suggests this.

View solution in original post

9 REPLIES 9
Solution
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi,

Each kind of property is available for only elements with a specific classifications.
In Property Manager if you select a Property, then you can check the list "Availability for Classifications".
Therefore an unclassified element cannot have properties. I bet your wall is unclassified and that causes the issue.

Property Test Add-On function tries to create a new property and makes it available for the classifications of the selected element. But if your element is unclassified, then the created property will be available for none and cannot be set for the selected element. The error code APIERR_BADPROPERTYFORELEMENT suggests this.

Ben Cohen
Advocate
Hi Tibor

I am also having issues with the Property Test Addon.
But I can't get it to do anything. Not one of the functions will work for me. !! (They show in the test menu)
I have successfully compiled other addons for 22 without issue.
I have tried the default template, checked my classifications, checked the property types etc etc but still nothing. I don't even get error messages...

Any help greatly appreciated

I am using Xcode 9.4 on High Sierra. AC 22.
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Ben,

I made a short video to present the first few functions of the Property Test AddOn: https://lorantfyt.tinytake.com/sf/Mjg3NTc0Ml84NjMxMjQ0
  • I drew a wall and opened it's settings. I can see that it has a classification ('Wall' in my case) and has properties ('Fire Resistance Rating' in my case).
  • I selected my wall and used the first function of the Property Test Add-On from the 'Test/Properties/Define a new bool custom property for the selected element' menu.
  • I opened the settings dialog again and I realized that a new group of properties was added to my element and there is one property inside it with 'Property_Test Add-On Definition ...' name and it's value is 'True'.
Could you repeat these steps please using your project and tell me which step works differently for you?
(For example at first step your wall doesn't have any classification or property.)

Regards,
Tibor
Ben Cohen
Advocate
Hi Tibor

Thanks for the prompt reply...
My addon will not do any of that.
It seems that something is missing in the build that is totally preventing it from working.
I have created a screen recording here

https://www.dropbox.com/s/2q8c0ai8t3xvkx6/Property%20API%20Issue.mov?dl=0

This API has so much potential.. I really want it to start working
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Ben,

I uploaded my Property_Test Add-On (macOS build) zipped here:
Could you try with this please? Do not forget to remove your Add-On before.
If it's still not working, then could you send me your ARCHICAD project file please? (archicadapi@graphisoft.com)

Regards,
Tibor
Ben Cohen
Advocate
Hi Tibor

Your addon works perfectly...
Could my XCode be missing some component.. ?
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Ben,

Could you send me please a screenshot of your Xcode build report?
Have you made any changes in the source of the Property_Test example Add-On?
I uploaded the source of the Property_Test example Add-On:
Ben Cohen
Advocate
Hi Tibor

OK.. I downloaded your project and compiled.. still wouldn't work.
So I copied over the entire examples folder from the devkit and bingo!! started working.

The only thing I had changed was the MDIDs_APICD.h (of course)... maybe I need to resave this file as it has been untouched for years..
Also, strange that my other project compiled without issue?.

Thanks so much for your time on this mate... really appreciated
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Ben Cohen
Advocate
confirmed...
Of course the newer projects where not contained in the MDIDs_APICD.h. DOH!!

Thanks Tibor...
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au