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

Convert morph to an Object in C++ Add-On code

kency
Enthusiast

Hello,

 

Is there a function that would convert the given Morph GUID to an Object in C++ API like we do it in UI.

kency_0-1720005671602.png

 

13 REPLIES 13
Akos Somorjai
Graphisoft
Graphisoft

Hi kency,

 

Here comes the modified object (inside the .pln).

I replaced the '262144' in the EDGE commands with '2' -- see the statuses for the EDGE statement in the GDL manual.

 

Best, Akos

 

Screenshot 2024-07-15 at 13.32.40.png

Thank you @Akos Somorjai This gsm was created from Morph using the command we shared earlier  https://graphisoft.github.io/archicad-api-devkit/struct_a_p_i___save_pars___object.html. So is there something we can correct here itself? Rather than editing the created gsm again.

Hi kency,

 

You're welcome!

Well, there isn't any parameter in that function that would affect the script that way.

But: you can update the 3D script of the created library part with ACAPI_LibraryPart_UpdateSection().

 

Best, Akos

kency
Enthusiast

@Akos Somorjai We are updating the edge status, which worked for most of the gsm files, except for a few. Looks like these are not edge lines and instead it is something else. 

1. Do you have any more suggestions? Attaching the gsm file. 

kency_0-1723010807951.png

 

2. On another note, we could not remove the facet lines on a morph through the add-on API. We have the option in Archicad UI though. We bumped into this discussion here. Is there any other way to remove these lines through code?