cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Gabor Szelei
Enthusiast

How to run a macro's parameter script from a main object without code duplication?

Hi Everyone,
I have created a modular sub-object (macro) that includes its own Parameter Script to handle dynamic value lists (values commands) and parameter constraints.
I want to call this macro from a Main (controller) object. Currently, it only works if I completely copy-paste the macro's Parameter Script into the Main object's Parameter Script. If I don't copy the code, the dynamic drop-down lists do not appear or work in the Main object's default parameter list.
My question is:
Is there a clean, simple way to trigger or execute a macro's Parameter Script from a Main object without duplicating/copying the code into the Main object?
I want to use the standard default parameter list of the Main object, and I would like to avoid building a custom Interface Script if possible.
Thank you!
Gábor

 

Operating system used: Windows 10

Versions 6.5 to 28, AMD Ryzen 9 3900x, 32GB ram, GeForce RTX 2070 super, Windows 10
1 Reply 1
Barry Kelly
Moderator

If you have the same parameters in the list of your main object that you use in the macro, you should then be able to call the macro from the parameter script in the main object.

You can hide the parameters in the main object if you don't want the user to see them.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

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!