Equation Discoveries II

For those of you who missed part I, here's the original link...

formatting link
I found a few more operators, but I don't know how to utilize them or what they can be used for.

Does anyone have any suggestions?

Here's my list O' operators...

like -> Used as an "equal to" (why can't I use "="!) -> Used as a "not equal to" (stopped working?) and -> Can be used or -> Can be used & -> Used to "Concatenate" (add two strings) not -> not sure what it does? eqv -> not sure what it does? imp -> not sure what it does? mod -> not sure what it does? xor -> not sure what it does?

Here is an example (in SW2004) of a 'pendulum' type of motion. I used some equations to create momentum as the pendulum swings to simulate the effects of gravity...

formatting link
Just open the file and hit rebuild to see it go or use my rebuild macro.

Here is an AVI if you want to kick back and see it work without having to do anything...

formatting link
What can we do with these crazy operators?

Mike Wilson

Reply to
Mike J. Wilson
Loading thread data ...

hey! but they're all Visual Basic keywords! This means SW equations use either VBA or what's called the "Script Control" (the one we use in

formatting link
to make programmable shapes)

"like" compares strings in VB... strange...

now, once you know that "true" = -1 in VB and "false" = 0, you can write equations like: "D3@Sketch1"=-("D1@Sketch1">"D2@Sketch1")*"D1@Sketch1"-(not "D1@Sketch1">"D2@Sketch1")*"D2@Sketch1" which sets D3 to the largest of the D1 and D2 values....

Nice, isn't it ?

Reply to
Philippe Guglielmetti

That is nice. I'll have to experiment with that. You didn't use "IIF" Thanks for the help Philippe!

Mike

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----

formatting link
The #1 Newsgroup Service in the World! >100,000 Newsgroups

---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

Reply to
Mike J. Wilson

Me stupid C++ programmer... I didn't even knew "IIF" existed! :-)) Of course D3@Sketch1"=IIF("D1@Sketch1">"D2@Sketch1","D1@Sketch1","D2@Sketch1") is much simpler...

Reply to
Philippe Guglielmetti

Is there a character limit to the length of an equation? I know MDT has a limit and the only work around was to rename the variables (dimensions) to shorter names which increased the power of the equation, but decreased the debugging, since one has to know what 2 or 3 letter names ment .

Keith

Reply to
Keith Streich

Is there a character limit to the length of an equation? I know MDT has a limit and the only work around was to rename the variables (dimensions) to shorter names which increased the power of the equation, but decreased the debugging, since one has to know what 2 or 3 letter names ment .

Keith

Reply to
Keith Streich

Is there a character limit to the length of an equation? I know MDT has a limit and the only work around was to rename the variables (dimensions) to shorter names which increased the power of the equation, but decreased the debugging, since one has to know what 2 or 3 letter names ment .

Keith

Reply to
Keith Streich

I've never heard of one, although the equation editor is about the clunkiest thing you've ever used which makes it very tedious to work on long equations.

Mike Wilson

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----

formatting link
The #1 Newsgroup Service in the World! >100,000 Newsgroups

---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

Reply to
Mike J. Wilson

Mike, everyone,

I used to use the equations/editor all the time in the early days. But have virtually given up using equations, since they are such a pain to set up & debug, and is the most ignored SW utility. Perhaps we could all gang up and submit our suggestions, and get them incorporated in

2005. Here are some of mine. I am not currently using 03/04, so ignore those that are already in there.

  1. Allow "variable" drag and drop from sketches. Click on a dimension, cut & paste or drag & drop into equation.

  1. Highlight the sketch in the feature manager when selecting each a variable in the editor.
2a. Better yet, allow a find sketch when selecting a variable, or add a search for sketch by variable.
  1. Highlight all dims/sketches in colors when selecting equations. (Similar to Excell)
  2. Allow direct import or dynamic excell equations.

clay

Mike J. Wils>>"Keith Streich" wrote...

Reply to
clay

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.