I´m trying to create this cabinet hatch as a dynamic components with options width and height.
When i change the width the profile gets stretched like in the picture.
Is there any way to lock the profile and only be able to change the length of that part?
Changing LenX, LenY or LenZ is a scaling operation and is applied to the entire component so of course the cope profile in this case will be distorted. The fix is to split the rail into thee pieces. A center section that is flat on the ends and separte components for the ends. The move the end component and scale the center section. You can make the three pieces look like a single piece by hiding the end faces and edges so they can’t be seen. If you want to be able to edit the width of the rails and stiles you’ll need to divide the components lengthwise as well. Then move the edge profile while scaling only the outer part.
FWIW, if you want to make dynamic raised panels, you have to divide them into nine sub-components. Them move the corners as appropriate. You can scale the center components along each side in the same direction as the raising runs. The center section can be scaled in both directions.