
Re: change the direction of an equation driven dimension
Igor Fomenko Jan 17, 2018 7:31 AM (in response to Tomas Yaczik)Place dimension from other base

Re: change the direction of an equation driven dimension
Tomas Yaczik Jan 17, 2018 9:19 AM (in response to Igor Fomenko)That wouldn't work. This dimension needs to go from the same end of the part every time and adjust measurement given a certain set of conditions be met in an IF statement

Re: change the direction of an equation driven dimension
Igor Fomenko Jan 17, 2018 10:40 AM (in response to Tomas Yaczik)Very strange, in math you can change coordinate system and recalculate all what you need (vectors, tensors). Can you upload some simplified example

Re: change the direction of an equation driven dimension
Tomas Yaczik Jan 17, 2018 11:30 AM (in response to Igor Fomenko)here is an example.

SketchExample.SLDPRT.zip 49.4 KB





Re: change the direction of an equation driven dimension
Kevin Chandler Jan 17, 2018 8:06 AM (in response to Tomas Yaczik)Hello,
Try putting a minus sign at the beginning of the equation in Manage Equations.
Press Ctrl+Q and the dimension should go the other side.
Return to Manage Equations and remove the minus sign you just added.
Adding a minus sign in a sketch for "regular" dimensions is the method for flipping things.
Cheers,
Kevin
EDIT: Some screen shots:
Before Ctrl+Q":
After Ctrl+Q (while taking screen shots, this did update by itself, but Ctrl+Q it anyway):
Remember to return to Manage Equations and remove your minus sign.

Re: change the direction of an equation driven dimension
Tomas Yaczik Jan 17, 2018 10:15 AM (in response to Kevin Chandler)It told me that negative values aren't supported by equations, but I hit ok and the green checkmark anyway and the dimension flipped. Thanks!

Re: change the direction of an equation driven dimension
Vladimir Urazhdin Jan 17, 2018 10:55 AM (in response to Tomas Yaczik)Tomas Yaczik wrote:
It told me that negative values aren't supported by equations, but I hit ok and the green checkmark anyway and the dimension flipped. Thanks!
And don't forget to mark Kevin Chandler post as correct answer to let other learn the solution



Re: change the direction of an equation driven dimension
Rob Edwards Jan 17, 2018 10:10 AM (in response to Tomas Yaczik)Hi Tomas
I often need to add a dimension that sometimes goes to zero. In the past this caused me no end of problems with the direction flipping.
I'm not sure what is causing your problem  maybe you could elaborate  but I have found a variety of workarounds that have helped me.
Another condition that I have found causing dimensions to flip is if the underlying geometry changes, dramatically, so that the closest solution (what we get) is not the orientation we want.
Solidworks seems to have a preferred direction to choose and will forget your initial choice if you happen to want to go the other way.
I have discovered that an offset dimension is stable, so if necessary I incorporate them where needed. Here is an example from a job I'm working on at the moment. This is not a normal rectangle, it is actually two offsets and two lines. I drag the end points of the offsets and merge them to create my rectangle.
When I constructed this sketch with a normal rectangle and a normal dimension, it worked as expected on the right side of my part, but misbehaved on the left. The solution below is stable.
I don't think you can alter the direction with a negative value when using an equation
The solution is to make the equation work from an offset that means the value is always positive but has the desired effect,

Re: change the direction of an equation driven dimension
Tomas Yaczik Jan 17, 2018 10:30 AM (in response to Rob Edwards)Sorry about the lack of elaboration, I just checked with my boss to see how far I could go with details of what I'm modeling and showing proprietary information so on and so on. Anyways, the situation I'm in is I'm designing a conveyor like what you would see in a warehouse or something of that nature. Depending on the flow direction of the conveyor, I have a sketch that drives the position of several planes, each of which sets the first instance of every part I need at the beginning of the conveyor(1st roller, 1st drive belt, 1st logic card, etc). Depending on flow, my sketch will take a line with several points on it (each point defines the position of each of the aforementioned planes), spin the line 180 degrees, and then a dimension to the center of the now rotated line will push everything to the opposite end of the conveyor given a certain set of conditions in an IF statement is met (if flow dir = 0 degrees, do this, else if flow dir = 180 degrees , do that instead). Every one of those points on that line is dimensioned and mated coincidentally from the end of the now rotated line so when it is all rotated, they do not move and create some weird error once the model is rebuilt. I suppose I could just offset the dimension defining each part at the beginning to either go to x if flow is this way or length of conveyor minus x where the first in instance needs to go if flow is the other way, but this model is six months in development and to change the functionality in such a way, would require massive changes that we do not have time to make.

Re: change the direction of an equation driven dimension
Tomas Yaczik Jan 17, 2018 10:33 AM (in response to Tomas Yaczik)
Re: change the direction of an equation driven dimension
Rob Edwards Jan 17, 2018 11:02 AM (in response to Tomas Yaczik)Tomas
So if I follow you correctly, you have points along a line and you then rotate the line and sometimes the points go the wrong way.
If this is the case maybe you could make your line and points a sketch block and then rotate the block.
I was unsure whether you were allowed equations in a block, but they seem to work for me.
Alternately you could rotate a derived sketch

Re: change the direction of an equation driven dimension
Tomas Yaczik Jan 17, 2018 11:34 AM (in response to Rob Edwards)your sure the points wont switch directions? I've never used a sketch block before.

Re: change the direction of an equation driven dimension
Rob Edwards Jan 17, 2018 12:54 PM (in response to Tomas Yaczik)Tomas
I downloaded your example, it seems to work perfectly for me, so it would be nice if we could get an example where it fails.
I'm pretty sure a sketch block would stay stable, I've done you an example using a derived sketch, but also it might be easier to just use equations directly on your planes.
edit:
or this is simple

MovingPlanes2.SLDPRT.zip 51.5 KB

MovingPlanes.SLDPRT.zip 59.9 KB

Re: change the direction of an equation driven dimension
Tomas Yaczik Jan 17, 2018 1:06 PM (in response to Rob Edwards)This will work great! Thank you!







Re: change the direction of an equation driven dimension
Kevin Chandler Jan 18, 2018 12:08 PM (in response to Tomas Yaczik)Hello,
Another method suggestion, since you need to move a plane:
 Rollback your tree to just above the plane that needs correction
 Create a new plane that's where you need the incorrect plane to be located.
 You need this new plane to be before the incorrect plane, so alternatively, you can create the new plane w/o rollback and drag it to above the incorrect plane, but this assumes you can do so which depends on what's been created
 Rollback your tree to show everything
 Change the incorrect plane to be coincident to the new plane
 You can either leave the plane you just created there or you can delete it:
 If you're going to delete the new plane, first change the corrected plane to how you originally required it to be
Cheers,
Kevin