Create a component by clicking the add-on button

I am developing an add-on in Python.
After creating a button inside the add-on panel and clicking the button,
I would like to import a custom component from a local folder into the viewer.
Is it possible?
Please tell me the method and academy.
I think it will be helpful for development.
Thank you.

app = getApplication()
filePath = "file///:" + "D:/Example.vcmx"
component = app.load(filePath)

1 Like