2023-04-02 05:47 AM
Is a macro only a placeable off?
I want to know why you do macros.
2023-04-02 02:42 PM
You use macros if you have the same routines, that you would like to use in more than 1 object.
See: https://gdl.graphisoft.com/reference-guide/macro-objects
2023-04-02 04:34 PM
This is a question I asked because I wanted to hear your explanation.
Since I am a non-English speaking person, it is difficult to understand the text and I do not understand the contents of the manual alone.
I was asking for a bit more detail.
I would be more than grateful if you could explain with an example.
So how do you create macros?
All I found was to turn off placeable, is there more?
2023-04-02 06:38 PM
A typical example where I use a macro, is when I want to offer different languages in the object.
The Master-Script of the object calls the Macro:
CALL "Flexi_Zone_Dictionary" PARAMETERS ALL int_language = int_language RETURNED_PARAMETERS dict_words
The Macro has the following in the Master:
DICT local
IF int_language = 1 THEN
local.de.raumnummer = "Raumnummer"
local.de.raumname = "Raumname"
ENDIF
IF int_language = 2 THEN
local.en.raumnummer = "Zone number"
local.en.raumname = "Zone name"
ENDIF
DICT dict_words
IF int_language = 1 THEN dict_words = local.de
IF int_language = 2 THEN dict_words = local.en
PARAMETERS dict_words = dict_words
END dict_words
Explanation:
DICT local declares a Dictionary for the translated words.
local.de.raumnummer = "Raumnummer" is one dictionary entry for the language German (de) for the word Roomnumber (raumnummer)
DICT dict_words declares a 2nd Dictionary which is then stored in the parameter dict_words.
END dict_words returnes the values of dict_words to the calling object.
In the main object you can then replace a word in your own language by a dictionary term.
Normally you would write
TEXT2, 0, 0, "Raumname"
Now you can write
TEXT2 0, 0, dict_words.raumname
When you then change the parameter int_language from "de" to "en", the 2D-content will change its language as well. Create for this a VALUES field to let the user choose the language:
VALUES{2} "int_language", 1, "de", 2, "en"
Other examples are opening lines for windows, door closers, profiles for curtain wall windows etc.
2023-04-02 08:10 PM
Thank you for your answer.
But what I found was that the placeable was not checked in the macro. So, is there a macro that sets other options?
Or can I just call all gsm files and use them?
2023-04-02 08:37 PM
You can call all gsm-files to use them as macro. If "placeable" is unchecked, it will not be found as object in the object settings dialog. You can use a macro both as called object and in the case it is placeable as "standalone" object.