Choose language

Pattern code

Pattern code is written in English letters using size constants, functions, variables and string expressions. You may use other encodings in string expressions, that are in quotation marks, e.g.:

type(“Bottom Front”,P1); (English encoding)
type(“Низ переда”,P1); (Russian encoding)

Lines of code are separated by line break or semicolon (both options are allowed, which makes Sewist Pattern Designer easier to use if you are used to a particular programming language). E.g.


will work just as well as


By default, all numeric values are in cm for distances and in degrees for angles, depending on the function you are using. E.g. the code below creates a new point which is at 5 cm from the first point and is at 90 degrees from the first point:


Sewist pattern designer supports both one-line comments and multiple-line comments. Commented code will not be executed by the software. Comments are useful if you decide to make notes about certain operations, or if you would like to test a new approach, but you should backup the current code while you are testing.
To code one line, or part of a line, please use // at the beginning of the code block you wish to comment. E.g.

// neck=curve(P1,P2,0,90);
neck=curve(P1,P2,0,90) // draws a neckline curve in the back

You may also comment on several lines by using /* in the beginning and */ at the end of commented code. You may nest // comments inside, but don’t nest several multiple line comments into one another. E.g.:

//Ease graded depending on the bust girth


Previous article

Designer account

Next article