Start with creating a new feature studio.
Create a new feature and add input parameters. These will determine the size and type of brick you are creating.
Create a sketch and add sketch entities.
Extrude the sketch
In this example "definition.myRows" and "definition.myColumns" are variables representing the number of rows and columns input by the user. Create an inner and outer rectangle using the skRectangle function, and determine the location of the corners of each rectangle using the input variables. Remember that each stud of a LEGO brick is 8 mm apart.
Hint: Use nested for loops to create m rows and n columns of studs, where m and n are the variables you defined in the input parameters. (For the example code the variables are definition.myRows and definition.myColumns).
If you try to create multiple sketch entities using a for loop, FeatureScript will return an error because all of the entities you created have the same name. If you create an integer variable that increments every time you run he for loop, (lets call it "intCount" in this example), you can use the ~ operator to give each entity a unique name.