gotcha

Author Topic: Creating a custom dash pattern  (Read 9001 times)

February 22, 2017, 01:34:39 AM
Read 9001 times

kettenmaradtunk

  • Sr. Newbie

  • Offline
  • **

  • 4
Hi Everyone,

I've been trying to create a custom dash pattern by editing the preferences.xml, with the method specified in this topic on inkscapeforum.
However, after adding a new entry (or modifying an existing dasharray), Inkscape wouldn't start with the new preferences.xml. The window would show up for a second then immediately disappear.

Is there another method for adding a pattern to the Dashes drop-down selection in Fill and Stroke? What could be causing the problem?

Your help is much appreciated.

Best regards,

Csaba

February 22, 2017, 06:40:04 PM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

I hope you had backed up your prefs file, before editing?  It's odd that Inkscape won't open at all.  Because if you were to delete the prefs file completely, then the next time you open Inkscape, it should create a new one.  I'd say if you just rename that disfunctional file, then Inkscape would go ahead and make its own new prefs file, and open normally. 

I've never done this before, but I'll try it myself, and maybe I can learn something.  2 heads better than 1, you know?

I do notice that topic is a few years old.  So it's possible Inkscape has changed somthing since that time, which makes this process not work anymore.  I'm not sure if this comment by the op "(and in one other version)" is refering to Inkscape version, or another version of the dash pattern.  But it's worth a try.

What is the dash pattern that you want to add?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 22, 2017, 07:16:46 PM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh, it worked!  So I can confirm that that process works for 0.92.

Since Inkscape won't even open for you, I would guess you somehow messed up something.  What I did to edit, was just copy the last dash pattern (in text editor), then edit those dash code.  I used the pattern that op was using (dash-dot-dot).

So I copied this, the last dash pattern:

Code: [Select]
      <dash
         id="dash-0110-0110"
         style="stroke-dasharray:0.1,0.1" />

Pasted below it, and just above the group close tag (</group>)

Then for the id change 0110-0110 to 5-2-1-2-1-2, and for the style, change 0.1,0.1 to 5,2,1,2,1,2

Then Save the file and open Inkscape.  The new dash pattern is right there at the bottom of the list (except for Custom, which I'm not sure what it is at all).
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 23, 2017, 01:03:16 AM
Reply #3

kettenmaradtunk

  • Sr. Newbie

  • Offline
  • **

  • 4
Hi brynn,

Thank you so much for your help! Turns out this wasn't an Inkscape problem at all but that I didn't use the proper tool to edit the preferences xml...
After adding the new pattern in text editor it worked perfectly.

At least we both learned something. :)

Best regards,

Csaba

February 23, 2017, 01:56:35 AM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 25, 2017, 01:18:12 PM
Reply #5

k-drive

  • Jr. Member

  • Offline
  • ***

  • 30
I think this is related. It may be a different option instead of dashes. (I am going to read the rest of this thread to learn about custom dashes.)

I was recently searching for anything on interpolate/gradients. I ran across it.
I was going to "someday" try the pencil which is the last demo.
I had no idea you could modify the points in a path. But, there is a lot I don't know about the application.

https://design.tutsplus.com/tutorials/quick-tip-fun-with-objects-to-marker-in-inkscape--cms-20639

February 25, 2017, 01:39:31 PM
Reply #6

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Just an idea, with a pattern along path lpe you could get way more control over dashes.

(Dasharray scale with the stroke width, pattern does't.)