cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve an array from the model view options

Hi!

I want to create an object that show the id of the object in plan.

But if the identifier of this object is present in the MVO list, I want it to display the text chosen by the user in the model view options (an abbreviation in my case)

 

Capture d’écran 2023-05-19 à 10.10.25.png

 

I am not really experienced in GDL, so I don't know how to retrive an array from an other script.

 

!!!!!!!!!!!!!!SCRIPT PRINCIPAL

DIM valueT [][]

succes = LIBRARYGLOBAL ("OVM_Remplacement", "arrayValeurs" , req_arrayValeurs)



!!!! THIS PART DOESN'T WORK AT THE MOMENT


!for i = 1 to 3
!valueT[i][1]=req_arrayValeurs[i][1]
!valueT[i][2]=req_arrayValeurs[i][2]
!
!next i
!


Request ("ID_of_Main","",test)

compteur=test

!for i = 1 to 3
!IF test = valueT[i][1] THEN
!compteur=valueT[i][2]
!ENDIF
Archicad 27 - GDL - PYTHON
1 Solution

Accepted Solutions
kuvbur
Advocate

LIBRARYGLOBAL work only with 1d array

Industrial Architect and Structural Design Engineer, developer of free addon for sync GDL param and properties

Go to post

3 Replies 3
kuvbur
Advocate

LIBRARYGLOBAL work only with 1d array

Industrial Architect and Structural Design Engineer, developer of free addon for sync GDL param and properties

It worked well after making two 1d arrays. Thank you a lot!

Archicad 27 - GDL - PYTHON
Peter Baksa
Graphisoft
Graphisoft

Technically, returned arrays (libraryglobal, request, returned_parameters, ....) can be used as two-dimensional if declared with a fixed size in the receiving script. There are not many use cases when you know the size in advance.

Péter Baksa
Software Engineer, Library
Graphisoft SE, Budapest

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!