In the dialog box, the answer is from how to display a message from a blender script? may be the starting point.
But I think the best approach is to integrate input into the panel, for example,

To do this, you must add StringProperty to your add-in and place it inside your panel (see Addon Tutorial for more information). The main steps:
def draw(self, context) : col = self.layout.column(align = True) col.prop(context.scene, "my_string_prop")
...
def register() : bpy.types.Scene.my_string_prop = bpy.props.StringProperty \ ( name = "My String", description = "My description", default = "default" )
...
def unregister() : del bpy.types.Scene.my_string_prop
...
You can access the string using context.scene.my_string_prop
There is another way to integrate input. When you add, for example, text to your scene, you can change the parameters after the statement has been called and see the changes immediately:

Changing the location moves the newly created text object to another location. I have not worked with this, but it should look like the code above.
Kay
source share