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

Substitute Object Given X = 1

Lingwisyer
Rockstar

Hi all,

 

I was wonder how you would go about scripting an object substitution. Given a parameter in Object A, I want to replace it with Object B. I tried adding a CALL for Object B and script skip to the start of each of the scripts within Object A but that does not seem to have worked...

 

As a last resort I figured I could always extract the entire Object A into a new object with Object A would then call though I would rather not add more objects. IF X = Y then CALL "Object A" else CALL "Object B"

 

 

Ling.

AC22-23 AUS 7000
Self-taught, bend it till it breaks.

Win10 | E5620 x 2 | 24GB | K2200 RIP PSU
Win10 | R5 2600 | 16GB | GTX1660
2 REPLIES 2

Podolsky
Mentor

What I have found out, that CALL function must be in the form CALL ... PARAMETERS ... to work properly. It can be CALL ... PARAMETERS ALL or listed specific parameters, needed for this macro call. You can use CALL without PARAMETERS extension mostly when you call a text file with GDL extension rather then GSM file. Also you can specify a file name for your call as a string and after use it in CALL function: IF X=Y THEN s='Object A' ELSE s='Object B' : CALL s PARAMETERS ALL.

Lingwisyer
Rockstar

I am not sure what I did, but a few days after this query, the object substitution was working...

AC22-23 AUS 7000
Self-taught, bend it till it breaks.

Win10 | E5620 x 2 | 24GB | K2200 RIP PSU
Win10 | R5 2600 | 16GB | GTX1660

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!