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
- Logic & functions ODD vs EVEN

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

06-03-2016 04:45 PM - edited 06-03-2016 04:48 PM

Is there any way to identify odd vs even numbers within the variables? I looked at the built in functions and did not find anything that would help build up logic for Odd vs Even.

In specific what I'm working on is making a model for drawer packs. When a drawer is 16 or 17" deep, we use a 16" slide. When a drawer is 14 or 15" deep, we use a 14" slide, etc..

My goal is to automate hole positions relative to the front and back of the drawer, but cant find any logic that would help out that specific issue without manual input.

There are so many other variables involved in the task I really want to automate that one specific issue.

Edit- I may have figured it out. If I divide the number by 2, then use FIX to round down, that may get it done.

Solved! Go to Solution.

4 REPLIES

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

06-06-2016 08:33 AM

@12GAGE, I don't understand the question or what you are trying to accomplish. Not sure why you need to differentiate odd and even variables for hole postions. Anyway, an illustration or example might be helpful.

Bruce Shand

ST9 MP10 - Insight - Win10 - K4200

ST9 MP10 - Insight - Win10 - K4200

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

06-06-2016 09:58 AM - edited 06-06-2016 10:00 AM

I need to add 1" to a specific dimension when another dimension is odd.

Say X=12 to 36 in 1 inch increments

Y is 1.25 when X is even, Y is 2.25 when X is odd

X2=X/2

X3=Fix(X2)

X3=2*X3

X4=X-X3

Y=1.25+X4

is how I got it done. just figured it out.

The reason why and the specifics are very complex. The nutshell answer is I have a mechanical part that comes in 2" sizes where the parts that use it are 1" sizes.

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

06-06-2016 10:20 AM

Hi 12 Gage,

without asking or understanding why and what the solution within Solid Edge would be as following:

I will split the solution into several steps, which are not necessary.

You can accomplish it in one step (formular) too:

- define a help variable e.g. Xhelp1 = int(x/2)
- then make another help variable Xhelp2 = 2*Xhelp1

This might either be equal X or one less X - Now You can use a kind of IF formular with following syntax for another helping variable let it call Yhelp = -(Xhelp2=X)*1

This now either can be 1 for even or 0 for odd original variables - And this one could be added to Y bringing exactly what You requested

regards

Wolfgang

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

06-06-2016 10:35 AM

Follow Siemens PLM Software

© 2017 Siemens Product Lifecycle Management Software Inc