Inkscape.org
Creating New Extensions Get svg file/path within extension
  1. #1
    DrQt DrQt @DrQt

    It is possible to retrieve the open svg's file path from within an extension?

  2. #2
    inklinea inklinea @inklinea⛰️
    😀

    Perhaps something like this :

     

    my_svg_filepath = self.document_path()
    
    # Check to see if user has saved file at least once
    if len(my_svg_filepath) < 2:
        inkex.errormsg('Please Save Your File First')
    else:
        inkex.errormsg(my_svg_filepath)
  3. #3
    DrQt DrQt @DrQt

    Thank you.

Inkscape Inkscape.org Inkscape Forum Creating New Extensions Get svg file/path within extension