Question about reusing component

Hi every professors,

I want to resue the existing components in a new modeling,but there is a problem in it.
First,I new a component named cube_1 and define its features,then save it .
Second,I want to reuse the cube_1,into Modeling,I click behaviors to compile pythonscript about cube_1.
Third,I import the cube_1 into this new modeling.
when I finish the above three stages,problem is coming.It reminds error:

Traceback (most recent call last):
File "C03::PythonScript", line 32, in rotate
ReferenceError: Object no longer exists.

That means script can’t find the cube_1.If I change the stages, import the cube_1 before compiling script,it doesn’t remind the error.
However,import the component before compiling which takes up a lot time of reusing the component,do you have the efficient method to reuse the existing component ?