Saturday 4 October 2014

Making of Purge Variables for Solid Edge - Part 1

A competing program Inventor 2015 recently introduced the purge variables feature in its variable table. AutoCAD too has an elaborate Purge command for purging layers, blocks, etc.

I read about some users seeking this functionality on the Siemens forum recently and thought creating a similar command for Solid Edge together would be fun. This tutorial takes you through the steps.

This tutorial is part of the Solid Edge Maker Faire and takes you step-by-step through the coding process to build such a program from scratch for Solid Edge. Other tutorials in this series can be read here.

01At the end of the last part of this article are the free program and source code for download.

Purging is deleting unused variables automatically. Unused variables are those not used in any formula.

Consider a Solid Edge document with variables as below:

01

Variables C, G and H are unused since they are not used in any formula.

Variables D, E and F have formulas but these variables are themselves not used in any formula. Hence they are unused variables too.

Only variables A and B are used in formulas. Also note Height and Width are dimension variables hence they are used variables.

Our Purge Variables command when invoked will display all unused variables in a sleek dialog as below:

02

User should be able to select all or specific unused variables and click the Purge Selected button, upon which all selected unused variables will be deleted from the Variable Table and also from the list on the dialog.

Start Visual Studio.

This tutorial uses VS 2010 with .Net 4 and Solid Edge ST 6.

Only the necessary steps to build the program are discussed in detail. For Instructions on how to start a new VB.Net project and add Forms, Controls and References, etc. see the previous article on 'Making of Match Properties for Solid Edge'.

As mentioned earlier, the source code and the also the executable are available for download at the end of the last part of this tutorial. You may as well want to keep it open as you follow the instructions that follow.

Continued to Part 2...

Index of all Solid Edge Tutorials, Tips, Videos...

No comments:

Post a Comment