GDL
About building parametric objects with GDL.
SOLVED!

Pull data from MVO more efficiently?

derekjackson
Enthusiast

Hi, I'm just exploring using Model View Options to change the parameters of a series of objects for a template. The main area to be changed is all the stylistic stuff - pens, fills, surfaces, etc.

 

As it's for a range of objects, this is resulting in a huge amount of calls with LIBRARYGLOBAL line. Is there any way I could condense a series of parameters into a single LIBRARYGLOBAL call? Or does it have to be one parameter at a time?

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I am pretty sure you have to query each parameter separately.

Each parameter in the MVO has its own unique name.

And each will be different - pen numbers, line types, string values, numbers, lengths.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

View solution in original post

6 REPLIES 6
Lingwisyer
Guru

Maybe @Ben Cohen can answer this, as he has done this sort of thing.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
Barry Kelly
Moderator

You have to have a separate LIBRARYGLOBAL query for each parameter in the MVO.

Those queries can go directly in your object - you don't have to CALL a macro for them.

 

But if you do CALL a macro, you can add more than one LIBRARYGLOBAL query in it and you can use RETURNED_PARAMETERS in the CALL to bring the values back to your object.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Thanks Barry. My terminology was probably wrong in my query - I'm not using CALL at all - just the standard x=LIBRARYGLOBAL().

I was just wondering if instead of having 80 or so repeating lines, there was a way to condense all the info into something like an array and so only need to use the LIBRARYGLOBAL line once? It could then be unpacked in the script of the placeable object to get the useful parameters.

Solution

I am pretty sure you have to query each parameter separately.

Each parameter in the MVO has its own unique name.

And each will be different - pen numbers, line types, string values, numbers, lengths.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

maybe including all parameter names in a array and the executing the LIBRARYGLOBAL call in a loop?

 

derekjackson
Enthusiast

Yep, potentially. I guess I'm just assuming that repeated use of LIBRARYGLOBAL is inefficient but maybe there's no harm in repeating it lots anyway!

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!