SOLVED!
Number or Text Result in Macro
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2021-08-19
12:32 AM
- last edited on
ā2021-09-14
08:51 AM
by
Noemi Balogh
ā2021-08-19
12:32 AM
Hi GDL Experts,
My goal is to have the user change the parent object, using drop down value lists, that select various subroutines from the child object.
In the child object, I use the values{2} code to create values lists. From the values lists, I use IF __ THEN __ ENDIF statements to select subroutines based on what the user selects from the dropdown value list.
When I CALL an object using the CALL code, with a PARAMETER of the VALUES{2} of the child object, it only accepts a numerical number as a driver. e.g.
Standard code in parent object:
Question:
Is it possible to use a VALUES{2} list in the child and then, copy and paste the same VALUES{2} list into the parent? Then to drive the CALL code with a PARAMETER of the VALUES{2} from the parent? E.g.
Ideal code in parent object:
Thank you so much!
My goal is to have the user change the parent object, using drop down value lists, that select various subroutines from the child object.
In the child object, I use the values{2} code to create values lists. From the values lists, I use IF __ THEN __ ENDIF statements to select subroutines based on what the user selects from the dropdown value list.
When I CALL an object using the CALL code, with a PARAMETER of the VALUES{2} of the child object, it only accepts a numerical number as a driver. e.g.
Standard code in parent object:
CALL "child" PARAMETERS TypeFromChild=1
Question:
Is it possible to use a VALUES{2} list in the child and then, copy and paste the same VALUES{2} list into the parent? Then to drive the CALL code with a PARAMETER of the VALUES{2} from the parent? E.g.
Ideal code in parent object:
PARAMETER TypeToCallFromChild=TypeFromParent CALL "child" PARAMETERS TypeFromChild=TypeToCallFromChild
Thank you so much!
Solved! Go to Solution.
Labels:
- Labels:
-
Library (GDL)
1 ACCEPTED SOLUTION
Accepted Solutions
Solution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2021-08-19 01:06 AM
ā2021-08-19
01:06 AM
if the child object (typical referred to as macro) is not a placeable object then there is no need to create a dropdown menu for it. Instead this all should be done in the parent. Hence you need to ensure you have the same parameter(s) in the parent object. If you haven't added the parameter to the parent then it wont be able to be defined as a string, hence your numeric issue.
The parent is the controller and the child is just called to produce the results. This sentence sounds like slave labor, so I suggest you use the terms "main" (not "master" because a masterGDL object is a specific type) and "macro"
Macros (child objects) rarely need much of a parameter script as the user access of the parameters comes from the main (parent) object which the user places. If both main and macro are placeable then you have to set the values{2} in both.
The parent is the controller and the child is just called to produce the results. This sentence sounds like slave labor, so I suggest you use the terms "main" (not "master" because a masterGDL object is a specific type) and "macro"
Macros (child objects) rarely need much of a parameter script as the user access of the parameters comes from the main (parent) object which the user places. If both main and macro are placeable then you have to set the values{2} in both.
3 REPLIES 3
Solution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2021-08-19 01:06 AM
ā2021-08-19
01:06 AM
if the child object (typical referred to as macro) is not a placeable object then there is no need to create a dropdown menu for it. Instead this all should be done in the parent. Hence you need to ensure you have the same parameter(s) in the parent object. If you haven't added the parameter to the parent then it wont be able to be defined as a string, hence your numeric issue.
The parent is the controller and the child is just called to produce the results. This sentence sounds like slave labor, so I suggest you use the terms "main" (not "master" because a masterGDL object is a specific type) and "macro"
Macros (child objects) rarely need much of a parameter script as the user access of the parameters comes from the main (parent) object which the user places. If both main and macro are placeable then you have to set the values{2} in both.
The parent is the controller and the child is just called to produce the results. This sentence sounds like slave labor, so I suggest you use the terms "main" (not "master" because a masterGDL object is a specific type) and "macro"
Macros (child objects) rarely need much of a parameter script as the user access of the parameters comes from the main (parent) object which the user places. If both main and macro are placeable then you have to set the values{2} in both.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2021-08-19 03:33 PM
ā2021-08-19
03:33 PM
Hi Kirstian,
Thank you so much - you are so knowledgeable. I just tried it now and it works - so much fun! I will now try figure out the next step of the code
All the best!
Thank you so much - you are so knowledgeable. I just tried it now and it works - so much fun! I will now try figure out the next step of the code

All the best!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2021-08-19 03:55 PM
ā2021-08-19
03:55 PM
You are welcome, and yes GDL definitely is fun.
Welcome to Archicad Talk also, you will find a lot of knowledgeable people here for everything Archicad related.
Welcome to Archicad Talk also, you will find a lot of knowledgeable people here for everything Archicad related.