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

An issue that attribute index value of layers created by API is different from layer setting dialog

Ryo-H
Participant

Is there a way to make the index value of a newly created layer or layer combination the same as the layer setting dialog? If missing indexs are in layers (for example, layer attribute indexs are 1, 2, 5 and 6, and 3 and 4 are deleted), ACAPI_Attribute_Create outputs a new layer's API_Attribute structure with index is 3.
If a newly created layer by the layer setting dialog, it had index is 7, different from the ACAPI_Attribute_Create outputs. The same was true for the layer combinations. This difference may cause layer item conflict issues between teamwork users.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Akos Somorjai
Graphisoft
Graphisoft

Hi Ryo,

 

There's no direct way from the API; you have to create temporary attributes to fill in the holes.

 

Best, Akos

View solution in original post

2 REPLIES 2
Solution
Akos Somorjai
Graphisoft
Graphisoft

Hi Ryo,

 

There's no direct way from the API; you have to create temporary attributes to fill in the holes.

 

Best, Akos

Thank you for your reply. I'll try it.