How can i create special feature in solidworks?

I want to create new feature in solidworks by programming in API, but i cant reach to this target ..... how can i do that

1 Answer

Start by making 3 variables: Length, Width, Height.
Make a new sketch on any of the 3 planes, then draw a square.
While assigning a dimension to one of the sides, write "=", then choose "Length" from "Global Variables".
Do the same with the other side, choosing "Width" instead.
Extrude this sketch, choosing "Height".

Now, whenever you open "Equations" and edit one of the 3 variables, the cube will change...