Call one procedure from another at runtime

Hi all
Is it possible to call one procedure from within another procedure at runtime?
If we have a piece of code that is commonly used in many procedures it would be incredibly useful to store this code in one common procedure and call it from other procedures.
This way, any updates to the common procedure will take effect for any procedure that calls it, rather than us having to manually update multiple procedures with the same code.
Many thanks

Hello @Seahorse27 ,

As per our script writers, it is not possible to call one procedure within other during run time.
Instead, we can trigger a procedure when the alert condition is set to 1 when executing the other.

Please tell us if this suffices your query.

Regards,

Hi @Jay
Ok thank you for the information. Good idea about using the alert condition but I was hoping to run a few lines from procedure A, trigger procedure B to run (pause procedure A until this is complete), then carry on with the rest of procedure A.
Not to worry though, another workaround for us will be to save the common code into a .py file, deploy it to the machine, and then call it from our procedures.
Many thanks :slight_smile:

Not to worry though, another workaround for us will be to save the common code into a .py file, deploy it to the machine, and then call it from our procedures.

If you are going this route, @Seahorse27, saving the Python script (.py) in a network share will be the better option. You simply update the copy in the network share if ever you make revisions to the ‘original’ python script.

Hi @Rick_C
Ok thank you, appreciate the advice.