We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

REQUEST{2} Building_Material_info to override Parameter

Arnaut_2604
Booster

Hi there.
I want to include the option to override Surface, Fill and Pens based on the Building material.

As I realised after my request returning 0 and checking the reference guide under Request Parameter Script Compatibility I can't use "Building_Material_info" to override a parameter after AC20.

Is there a way around this?

And out of curiosity, why was this incompatibility introduced in the first place?

 

n = REQUEST{2} ("Building_Material_info", gs_trim_out_bm, "gs_bmat_surface", Surf)

text2 0,0,Surf

Parameters gs_trim_out_mat = Surf


I included the text2 function to check whether it returns the right value which it does.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
runxel
Legend

This option was discontinued because it could lead to invalid states in Teamwork.

May I ask what the use case even is?

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

4 REPLIES 4
Solution
runxel
Legend

This option was discontinued because it could lead to invalid states in Teamwork.

May I ask what the use case even is?

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

I'm thought of using it for the trim material options on a sliding door.
Thought it would be conveniant to just have surface, fill and pens change depending on the building material but still have the option to override it, hence wanting to change a parameter.

So actually it is not really needed to give it back to the parameter.

You can use the request in the UI script, and you can show the info there. Goal achieved!

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

I guess, but it's not quite the override I had in mind.
It makes sense why the GS windows and doors can't be set to a building material but fills and pens need to be set seperately.