BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Archicad C++ API
About Archicad add-on development using the C++ API.

How to display profile attribute image images on DG items?

Ryo-H
Participant

Could I know a method how to display a picture like profile attribute preview of the Profile Manager on DG dialog in AC26 AddOn?
Specifically, it is assumed that the profile_vectorImageItems field of API_AttributeDefExt will be displayed as UserItem of DG.
I found able to use NewDisplay to draw an image on DG's UserItem at the Do_UCTest function in AddOn sample DG_Test.cpp. So I tried to use APIAny_ConvertMimePictureID function to directly convert the profile_vectorImageItems field of API_AttributeDefExt to API_MimePicture information. But this function returns APIERR_BADPARS, and I was unable to set the preview image of a profile attribute to NewDisplay.
I looked for information such as API and DG documentation. But I wasn't sure if another conversion was needed before setting the profile_vectorImageItems field to APIAny_ConvertMimePictureID, or if there was a completely separate method.

0 REPLIES 0
Learn and get certified!