cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
LeeJaeYoung
Virtuoso

Is it possible with an API to connect a new element to an existing label?

ACAPI_ELEMENT_MASK_CLEAR(mask);
ACAPI_ELEMENT_MASK_SET(mask, API_LabelType, parent);


element.label.parent = guid;

err = ACAPI_Element_Change(&element, &mask, &memo, 0, true);

This code is wrong. 

The label is not associated with a new element.

AC27 on window 11
1 Solution

Accepted Solutions
poco2013
Mentor

I believe that once created and placed, the status of a label can not be changed. This is because associated labels acquire the guid of the element they are attached to. Maybe wrong on this one?

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

Go to post

3 Replies 3
poco2013
Mentor

I believe that once created and placed, the status of a label can not be changed. This is because associated labels acquire the guid of the element they are attached to. Maybe wrong on this one?

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
LeeJaeYoung
Virtuoso

This is the part I don't understand.
If it's because of the Guid, it's because you'll have to re-specify the Guid.
If I need to fetch information via Guid, but there is no command to get it back, then I can understand.
This article was translated from translate.google.com.

AC27 on window 11
LeeJaeYoung
Virtuoso

I know what you said is true.
thank you.
Have a nice day
API_LabelType
parent 
When creating new Labels,
set this to APINULLGuid to create an independent Label; or
set this to the GUID of the owner element (a labelable element) to create an associative Label.

When getting or changing a Label, this member will be filled with the GUID of the owner element,
or APINULLGuid, if the Label is independent.
It is not allowed to make an existing associative Label independent,
or make an existing independent Label associative.

AC27 on window 11

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!