Tagged: Label parameters arrays
October 18, 2019 at 07:43 #18276David CookParticipant
I’m looking to create a hybrid between two label types we have in our office to see if we can create something that has the best of two worlds.
LABEL 1: Reads our surface names (set up with a CODE:DESCRIPTION format) and strips off the colon and descriptions to display the code. Works well, provided instant update if the material is update in the surfaces dialogue or if the boss takes the file to site to meet the client and changes paint colours around the place.
LABEL 2: We have a finishes object on a negative story that has data which generates our finishes schedule. This data is then published the codes then become available for it’s partner label to read from. Great for QA in some ways in that you can’t annotate something that doesn’t have a place holder in the finishes schedule. But not so great if someone goes and changes the model surface/composite etc as it’s not linked
Label 2 puts the codes it imports into a parameter array. Label 1 also brings the remaining string into a parameter.
What I want to do is combine the code and make a line of GDL to return a true /false result of a search of the Label 2 array to find if the value provided from Label 1’s request is present.
The idea is to get the best of both. Have a label that returns the code from the model appearance, but if it’s not in the schedule data, display something outrageous that prompts the user to go and put it in there so the correct code is displayed.
Does anyone know if this is possible? Any direction on what to investigate with regards to the comparison would be most helpful.
October 18, 2019 at 11:35 #18277Péter BaksaKeymaster
Write a WHILE loop that compares the value to each value in the array, and terminates when found.
If you need to use it in many places with many arrays, write it as a macro.
Library Platform, Software Engineer
October 18, 2019 at 13:23 #18278David CookParticipant
Thanks for that. I’ll give it a shot!
- The forum ‘Informations from the environment’ is closed to new topics and replies.