How to open a scene created with a plugin?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By vmpajares
:warning: Old Version Published before Godot 3 was released.

I created some scenes with a plugin.
But I can’t make the editor to open it after the creation. If I open it with the Scene -> Open Scene menu works ok.

I tried:
1

var editor = EditorPlugin.new()
editor.edit(load(scene_path))

2

var editor = EditorPlugin.new()
editor.edit_resource(load(scene_path))

3

item = preload("res://addons/Easycoria/templates/item_animated.tscn").instance()
var editor = EditorPlugin.new()
editor.edit_resource(item)

And the editor doesn’t do anything. With edit_resource I get no error, but no visible behavior. When I tried with edit rather than edit_resource it says:

SCRIPT ERROR: _on_ConfirmationDialog_confirmed: Invalid call. Nonexistent function 'edit' in base 'EditorPlugin'.

Maybe is a bug in the EditorPlugin? I work with the 2.1.3 stable version.

:bust_in_silhouette: Reply From: ULViDO

any solution after all these years? I want to open a scene with editor plugin. example below shows any response :confused:

get_editor_interface().open_scene_from_path(path)