Home › Forums › Problems and solutions in GDL › Informations from the environment › ASSOCLP_PARVALUE_WITH_DESCRIPTION
- This topic has 8 replies, 2 voices, and was last updated 7 years ago by
James Murray.
-
AuthorPosts
-
-
March 15, 2018 at 19:24 #3934
James Murray
ParticipantI assume this is the version of ASSOCLP_PARVALUE to use with parameters that have a VALUES{2} list. If so, I don’t understand how to get the description part of a given value.
James M
-
March 19, 2018 at 12:06 #3935
Gergely Fehér
KeymasterI tried wtih the following code in a labels’ 2d script:
dim p_values_and_descriptions[][] n = REQUEST ("ASSOCLP_PARVALUE_WITH_DESCRIPTION", "myParam", name_or_index, type, flags, dim1, dim2, p_values_and_descriptions) for ii = 1 to vardim1(p_values_and_descriptions) for jj = 1 to vardim2(p_values_and_descriptions) text2 jj, ii, p_values_and_descriptions[ii][jj] next jj next ii
This code writes both the integer value and the description to the floorplan view.
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE -
March 19, 2018 at 14:49 #3936
James Murray
ParticipantThanks, Gergely, but I’m not getting it. I did notice the TEXT2 line needs to be text2 j, i, p_values_and_descriptions[i][j]. But the label is still empty when applied. I’ve attached a simple test case.
Attachments:
James M
-
March 19, 2018 at 14:51 #3938
James Murray
ParticipantAgain what I post does not show up. I was trying to say the text2 line needs to refer to p_values_and_descriptions[i][j], not just [j]. (Incidentally, I tried to bold the [i].)
James M
-
March 19, 2018 at 14:54 #3939
James Murray
ParticipantOne more try. open square bracket i close square bracket open square bracket j close square bracket. Maybe it did the same thing to your text. Thanks again for the help.
James M
-
March 19, 2018 at 15:15 #3940
Gergely Fehér
KeymasterSorry, I changed to ii and jj, I hope it helps. (The forum engine stoles the single i char in square brackets, as it thinks is is an italic definition for text formatting.)
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE -
March 19, 2018 at 16:30 #3941
James Murray
ParticipantThanks, I’m getting closer. The array dump works. How do I capture just the description? I get an error if I try to set a variable equal to p_values_and_descriptions[1][1], for example.
James M
-
March 28, 2018 at 12:47 #3966
James Murray
ParticipantAnything more on this?
James M
-
April 13, 2018 at 11:14 #3996
James Murray
ParticipantGergely, I’ve submitted this as #244744. I would have PM’d you but I didn’t see the option.
James M
-
-
AuthorPosts
- The forum ‘Informations from the environment’ is closed to new topics and replies.