As Bryan pointed out it's not very clear what you're attempting to do. However, from what I understood I attached a simple example for you.
To retrieve the results from the PLECS simulation to your simulation script, you can either use a scope block or a signal outport block. In the attached example, we calculate the duty cycle "d" of a boost converter from the PLECS simulation, which we can then use in the script for post-processing, or use this value in a second PLECS simulation. Is this similar to what you're intending to do?