cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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.