Inkscape.org
Beginners' Questions Image name not being remembered when Saved after using Export As button
  1. #1
    Mark_e_7 Mark_e_7 @Mark_e_7

    I've have many small icons on an Inkscape canvas/page.

    When I want to export one of them individually, I highlight it, abd using Export PNG Image, I see the default location with some arbitrary name assigned to the image being exported, like ... text3785.png.  That's expected since the image is being exported for the first time.

    When I hit the Export As button, the directory dialog opens to the default save location -- so far so good.

    There I change the File Name from text3785.png to  "foo.png".   Hit Save. then Export button... the image is saved as foo.png.  -- So far so good

    THE PROBLEM is that if I highlight the foo image again (immediately and without changing anything about it) and try to export it, the path does NOT "remember" that it was just saved as "foo.png" ... instead I get another text-number.png assigned to it.

    What do I need to do/set in Inkscape so that images which are selectively exported as uniquely named images, that their names are "remembered" what they were last saved as??

    I though that the "Save" option in the windows file dialog "saved" the name + location? Its saving the location, not the name.

    Having to reenter the names of images being exported every time is costing me a lot of time as I have many many separate images on one Inkscape canvas.

    Hopefully there is a small setting I am missing somewhere please?

    Thanks for the help, I'm using Win10, latest. Inkscape 0.92

     

    +++++++++++++++++++++++++

    Some added context which might/might not help ... Often I Copy/paste or Duplicate whole or parts of existing images in order to create additional/new ones and then simply change colors or labels to help me keep them all the same size etc and to speed up work, instead of having to recreate things from scratch. But honestly, this problem happens if I create something from scratch as a new image too. 

     

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    Here's how I'd deal with the issue:

    1. In the Objects dialog, select the working layer and export a png to set the path.
    2. Save the document.
    3. Select an object for export.
    4. In the Object Properties panel, change the ID and Label to something meaningful like Foo1 (press "Set").
    5. Create or duplicate an object and repeat step 4, with a different meaningful name like Foo2 (press "Set").

    Inkscape uses the object ID as the filenames for export, so changing the ID will make the export name useful.

    This does not automagically increment numbers after the names, but if you have to type a name, might as well be upstream where it can do more good.

    Entering a filename for the working layer export (Step 1) helps ensure the path does not get lost when deleting objects.

     

    It might be worth submitting a feature request for duplicates to have an incrementing number suffixed. 

     

    Exportfilenames.Svg   Inkscape 2020 08 31 09 47 11
    Exportfilenames.Svg   Inkscape 2020 08 31 09 46 54
  3. #3
    Mark_e_7 Mark_e_7 @Mark_e_7

    @TylerDurden thanks for the response, but sorry, I'm afraid you may have misunderstood what I'm hoping for.

    creating and maintaining a saved-to path is not the problem.

    Saving the objects name that is unique to each object and which is entered when saving it (using the path) is the problem. The "object's-associated-name" saved is not being linked and remembered for the object to which it was applied when it was saved as a *.png.

    To repro:

    create 1 square -- redsquare in icons.svg. Now assume the Save path for the icons.svg file is c:\mydir\myimages. Now I want to save the red square object as redsquare.png -- so I select it, in the export dialog I see c:\mydir\myimages\text12345. I change that to c:\mydir\myimages\redsquare ... and save it.  Now redsquare.png is saved to/as c:\mydir\myimages\redsquare.png.  Great.   Hmm... now I want to change the color of the square to green. After doing that I select the object again, go to export, and THAT'S where the problem is: the suggested path and name is : c:\mydir\myimages\text127649 NOT c:\mydir\myimages\redsquare.png as I expected since I "saved" it that way. OK you may say that I changed the objects's color -- perhaps Inkscape thinks it's a different object. OK.. BUT this behavior happens even if I make NO changes to redsquare -- I simply wish to resave it -- in that scenario it STILL provides a new textNumber file name and does not remember what the object was saved as.

    It is also inconsistent .. I have some objects in a few svg's files whose saved names ARE remembered, but then in some the object name is never saved -- and I can't seem to figure out why the objects-saved-name is remembered sometimes, and sometimes its not.

  4. #4
    Tyler Durden Tyler Durden @TylerDurden
    👍*
    Mark_e_7

    this behavior happens even if I make NO changes to redsquare -- I simply wish to resave it -- in that scenario it STILL provides a new textNumber file name and does not remember what the object was saved as.

     

    As stated above, Inkscape uses the object ID as the default name for png export. Set the object id to the name you want, and each time you select the object the export dialog will use the name. 

    Names
  5. #5
    Mark_e_7 Mark_e_7 @Mark_e_7

    Ok -- got this. Thank you!! 

    PS: For those reading in the future... if you multiselect a group of objects, the Objects Properties dialog will be greyed-out/non functional.

    Instead, remember to select just one object, set its ID, then, you can multi-select objects and as long as that SET-named object is part of the group selected, the Export name will display the name that was set, and you can export the collection selected by that nameSet.

    This has saved me a tonne of work!!

     

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Image name not being remembered when Saved after using Export As button