turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- Solid Edge
- Forums
- Blogs
- Knowledge Bases
- Contests
- Groups

- Siemens PLM Community
- Solid Edge
- Solid Edge Forum
- How to use maximum or minimum functions like in ms...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-25-2014 04:39 AM

Maximum and minimum functions are present in ms excel. In solid edge I want to use same functions into variables. Actually I have an assembly where one of the dimension should be minimum of other two dimensions.

Say V101=minimum (V102 , V103)

how to do this in solid edge. What is the syntax to write this type of equations. Do solid edge supports logical operators in variable tables?

6 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-25-2014 07:49 AM - edited 03-25-2014 07:54 AM

Variable table in the current version does not support the minimum function.

But there are several possibilites assuming you want to compare just two values:

1. From the variable table right-click the row for V102 and select Copy Link from the context menu. Go to Excel and Paste Special, select the Paste Link radio button in the dialog that appears.

Ditto for V103. This will setup a SE-Excel link for the variables to compare. Use the cells in Excel in the =MIN() function there.

Next Copy the result of the MIN() function from Excel and back in the variable table, Paste Link (not Paste) the result into V101. This wil setup a Excel-SE link and everytime the values of V101 or V102 chage in Solid Edge they will be updated in Excel and the result of MIN() from Excel will be updated in Solid Edge.

2. Another method would be to write a little logic for calculating the minimum (actually smaller) of the two values. Use notepad and paste the following code:

Function minimum(ByVal V102 As Double, ByVal V103 As Double) As Double

If V102 < V103 Then

minimum = V102

ElseIf V103 < V102 Then

minimum = V103

End If

End Function

Save the file as minimum.bas (avoid saving as minimum.txt).

In the variable table click in the cell for V101 and click the Function (fx) button.

Select Visual Basic from the list and pick the minimum.bas file.

Select the function that reads minimum.minimum and click Next.

Specify V102 and V103 and click Finish

Note however that both methods are an overkill to just find the smaller of two given numbers.

Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-25-2014 08:35 AM

I ALREADY TRIED DOING UR 1ST METHOD. LINKS PASTED FROM SOLID EDGE, SHOW VALUES IN EXCEL SHEET AS (XXX mm) AND THUS THE FUNCTIONAL CALCULATION IN EXCEL SHEET IS NOT POSSIBLE.

AND FRIEND I AM TRYING MORE COMPEX EQUATION, I WROTE MAX OR MIN FOR ASKING IT TO U IN SIMPLER WAY

ANY WAY THANKX A LOT

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-25-2014 10:29 AM

I misplaced my earplugs though

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-26-2014 05:29 AM

V101 = -1*( V102 < V103 )* V102 +-1*( V103 <= V102 )* V103

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-26-2014 07:04 AM - edited 03-26-2014 07:20 AM

Tried it out, works like a charm.

Scanned the SE ST 6 online help on variable table thoroughly but could not locate where it says logical operators could be used.

Further I tried this out in Excel but it always gives me a negative value:

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-07-2014 09:12 PM

The logical operator in Solid Edge returns a -1 or 0 based on whether the condition evaluates to true or false whereas Excel returns 1 and 0, hence the answer is negative. Best way is to always use the ABS function ahead of any logical operators whose output is multiplied by a scalar.

Follow Siemens PLM Software

© 2018 Siemens Product Lifecycle Management Software Inc