cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

Retrieve an array from the model view options

Mathias Jonathan
Enthusiast

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
1 ACCEPTED SOLUTION
3 REPLIES 3

Solution
kuvbur
Enthusiast

LIBRARYGLOBAL work only with 1d array

Structural engineer, developer of free addon for sync GDL param and properties

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

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 as a Platform
Graphisoft SE, Budapest

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!