DriveWorks Responsive Design avec DWFormContainerWidth [VIDEO] (en anglais)

Article by Jim Peltier, CSWE updated May 12, 2015


This year, I had the pleasure of experiencing DriveWorks World (in Chicago). It’s an exciting event held annually in mid-March with DriveWorks users from around the world. The first few days of the event gave me a chance to re-learn some things about the DriveWorks SOLIDWORKS add-in, renew my CDWP (Certified DriveWorks Professional) certification, as well as get acquainted with some of the new features (which they discussed in detail on the fourth day). One such feature, the first one I learned about, was DWFormContainerWidth – this command measures the width of the form.

Responsive design with a DriveWorks Form

If may not sound too exciting, but this has great applications to make your form responsive for different sizes of screen and resolution. This is ideal if you are using DriveWorks Live and your forms are available online (think of all the different devices that you can view a web page with these days). You can have your form adjust to fit the screen rather than having to design different forms or have a mobile site for smaller screens.

DriveWorks Responsive Design - the form adjusts to different sizes of screen

DriveWorks Responsive Design – the form adjusts to different sizes of screen

DriveWorks pushes this responsive design as the main advantage, but being a long-time SOLIDWORKS user, I saw an even bigger advantage: Being able to apply the concept of Design Intent to a DriveWorks form. In the video, you will see me use the new command to do 3 different things:

  1. Make a picture the same width as my form (it stretches the picture)
  2. Center a macro button
  3. Re-arrange my buttons if my form width gets too narrow
  4. Bonus: Right-justify a macro button (I set this up for the “Aim Right” button before the video)

Obviously I’m able to apply this functionality for more form controls than the ones shown, and by using these techniques, I can develop some really cool-looking forms that are quite versatile.

DriveWorks vous intéresse ?

Learn more about the DriveWorks SOLIDWORKS add-in software and what it can do to automate your design and launch your business on the web.

Jim Peltier, CSWE

Jim utilise SolidWorks depuis 2001, et a passé la majeure partie de cette période à travailler dans la conception d'équipements industriels de fabrication automatisée. Il travaille en tant qu'expert en applications chez Javelin Technologies à Oakville, en Ontario, depuis juillet 2012 et est un expert certifié SolidWorks (CSWE).