Saturday 20 September 2014

Match Properties for Solid Edge - Part 1

AutoCAD has a Match Properties 02 command under the Modify menu.

This command, like the Format Painter of MS Office 03allows to select a source object whose properties are picked, followed by selecting destination objects whose properties are are modified to match with those of the source object.

The properties to match from the source can be configured via a dialog:

01

A similar functionality is lacking in Solid Edge as of ST 6, but making such a utility would be fun. This tutorial shows how.

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.

The Match Properties for Solid Edge command would work something like this:

1. When the program starts, it will check is Solid Edge is running and also if a Draft document is open.

2. It will check if a single object is selected as source on the sheet.

3. The program will also check if just one object is selected, else terminate.

4. The program will also check if multiple objects are selected, in which case it will terminate.

5. Once the program finds just one object is selected, it will check if it is either a line, circle, arc, ellipse, point, elliptical arc, spline or a point, else terminate.

6. If the single object is indeed one of these type, its Layer, Color, Line type and Line width properties will be stored in variables. The main dialog will now be displayed as below:

06

7. At this stage the program is ready to accept the destination object(s) which the user will go out and pick while the dialog remains floating on Top of any other applications including Solid Edge.

8. Once the user has picked the destination objects, he/she will see the dialog still floating and click the Match button, upon which the properties picked from the source object will be applied to the destination object(s).

  Only Properties whose check box is checked ON will be applied to the destination object(s). Also the destination object types will be check for line, spline, point, arc, etc. like in case of the source object.

  The following video illustrates how the new Solid Edge command will work:

[www.SurfAndCode.in] Match Properties for Solid Edge, the making of

Start Visual Studio.

This tutorial uses VS 2010 with .Net framework 4.0 and language is VB.Net

From the menu, select File | New | Project and when the New Project dialog appears, select Visual Basic if it is not the default.

Select Windows Form Application as the project type.

04

1. Specify the Project name as MatchProperties.

2. Specify a location for the project

3. Clear the Create directory check box.

4. Clear the Add to source control check box.

05

A new project is added with a blank Form.

Bring up the Toolbox 07 using View | Toolbox from the menu.

Create four check boxes the four picture boxes. Also a button called Match as below:

06

You can use the four images directly by cropping from the image above or from the Smart Select Options dialog box from the Select Command bar.

Continued to Part 2...

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

____________________________________________

No comments:

Post a Comment