In the attached photo, i want to define a relationship between a and b. I want to say that the sum of these two values (a & b) should be constant and equal to 150.
But i don’t know how I should formulate it with the equations' syntax of SolidWorks.
Is it possible by equations or i need to step into the realm of macros?
SolidworksApi/macros
b = 150 - a
Or am misunderstanding what you're trying to achieve?
As I showed you, it is possible to do with a very simple set up in equations but the issue is that you want it to all to be calculated instantly without a need of a rebuild. This, as Josh Brady explained eloquently explained, is just not feasible.
With a macro it might be possible to give the appearance as if there's no rebuild needed but the question is why bother to make a macro like that in the first place.
In other words, why is it vital that it needs to be with an equation or a macro?
The elegant solution offered by Rob Edwards in his first post is for what reason not good enough?
Rob, even i made the excel formulas and software to directly reach to focal points. no problem with the Geometric aspect of problem. my problem is not about solving the Geometric problem. i need the Technic to express and solve it with equations or macros.
wow! thanks for clear message. as usual i learned so much. this is what i love about this forum. to get the clear descriptions about what is going on in your mind. thanks for your time and clear context.
the same strategy you did with the relations should be done with the equations and macros. what you say about ellipse is right. but my point is this that such a logic should be exertable via equations and macros. but when we have no access to equations and macros your smart solution is completely right and is the last resort. or the solution which used the path dimension is also right and gives the right answer. or the solution which calculates the points and drawn shape via analytic Geometry is right too!! but my point is this: making such relations between the dimensions should be appliable with equations or at least macros!! and i want to find that track!
You can only use relations. Rob's first post is best. You cannot set up equations that will allow you to drag the length of one line and automatically reduce the other at the same time. It just doesn't work that way. Equations evaulate during rebuild.
You also cannot do that with macros. I mean, it's technically possible, but would be completely impractical and would involve significant effort by someone who is very knowledgeable about writing macros already. As a new user, it would take several years of learning SolidWorks and macros before you were at that point.
Please could you explain exactly how you would like it to work.
I'm not sure I understand the solution you require.
yep! that's right. i know that and i even made the geometric calculations to find the relations of radius's and focal points. but the original solution should be done via equations or macros. it should be done automatically NOT with my calculations.
Maybe this will help
Equations of Ellipses | College Algebra
Hi Meysam
Your problem is describing an ellipse, so another solution could be...
Here using two sketches
Note my Path Length is driven - just to show it works
Looks like it was introduced in 2014. No chance of upgrading your software version?
yes i did. it needs either a or b to be known. but i want both to be floating and the aggregate to be constant.
It isn't stuck with a constant value.
Have you tried yourself to see if having 'a' being set equal to a 'driven' dimension works for you or not?
i don't have path dimension in SW 2011 !!
woow !!
would you please give me some information about "Path Dimension"? where can i set it? i've not seen such thing before!
no actually it should not need any adjustment !! it should be dynamic and interactive not stuck in a constant value. that is what i am looking for...
Another way would be to have 'a' to be equal to the driven dimension of that side
Then you can calculate b=150-a
or
to make the dimension of side b being equal to 150- 'dimension of a'.
The latter needing rebuild after each adjustment of 'a'
If you want to simplify Rob's even further, you can use a Path Dimension on the two segments.
Good for you.
yeah i know what you mean. but this trick really works !!
He did.
SW will go crazy if you use that sketch for anything.
You can't solve 2 variables with one equation.
look at what Rob did! actually he solved it without knowing them.
i really got thrilled with what he did.
but i still need to exert the same logic with equations.
You cannot have 2 unknown.
You need to define either a or b.
omg !!
You did a subtle job Rob !!
Greaaaat!
i enjoyed it !!
thanks for sharing !!
but how can i do this with equations?
so basically: a + b = 150
Hi Meysam
How about this?
i don't want to reach a specified and defined triangle with constant sides! it's easy to do so. actually i want a make a dynamic equilibrium between the measures. i want to make SW exert and keep the equation while dragging the lines. just like the differential equations which do not have a number as an answer! the answer is itself an equation.
To achieve this, there should at least one rule for the triangle, like a degree.
i did it but this is not what i mean. it needs one of them to be determined. i want both the values to be floating.