sys.path.insert(0,framework_commons)
    print "Starting pymodelio.core.env.PyModelioEnv from path %s" \
          % framework_commons
    from pymodelio.core.env import PyModelioEnv

    #--------------------------------------------------------------------------
    # Define global functions that will enable accessing modelio global
    # variable from modules at any time.
    #--------------------------------------------------------------------------

    if WITH_MODELIO:
        from pyalaocl import asSeq
        def getSelectedElements():
            global selectedElements
            return asSeq(selectedElements)
        PyModelioEnv.addGlobalFunction(getSelectedElements)

        def getModelingSession():
            global modelingSession
            return modelingSession
        PyModelioEnv.addGlobalFunction(getModelingSession)

        def getSelection():
            global selection
            return asSeq(selection)
        PyModelioEnv.addGlobalFunction(getModelingSession)


    #--------------------------------------------------------------------------
    # Import modules to inject code and for convenience in the python console
    #--------------------------------------------------------------------------