Monitor dimensions from two sketches with sensor?

Use this space to ask how to do whatever you're trying to use SolidWorks to do.
User avatar
Hansjoerg
Posts: 113
Joined: Thu Apr 01, 2021 4:17 pm
Answers: 3
x 71
x 60

Monitor dimensions from two sketches with sensor?

Unread post by Hansjoerg »

Hello to all,

is there a way to monitor two sketch dimensions from different components with one sensor?
As soon as the dimension from component 2 is larger than the dimension from component 1, the alarm should be triggered.

I have only found the possibility to monitor one dimension against a statically given value.

Regards
All the "good" news about SWX makes me feel like I'm driving a truck with two trailers straight into a dead end.
User avatar
mike miller
Posts: 878
Joined: Fri Mar 12, 2021 3:38 pm
Answers: 7
Location: Michigan
x 1070
x 1231
Contact:

Re: Monitor dimensions from two sketches with sensor?

Unread post by mike miller »

You got me thinking! Check out the example below. It's pretty hokey but it works.

In case it's future version for someone:

1) Create a global variable that states =if(dim1>dim2,1,2). This compares the two dimensions against each other and outputs a value in inches.
2) Create a sketch with a dimension linked to the above global variable.
3) Create a sensor that monitors the above dimension. (It can ONLY be 1 or 2, basically true or false.)
Attachments
sensor test.SLDPRT
(47.98 KiB) Downloaded 64 times
He that finds his life will lose it, and he who loses his life for [Christ's] sake will find it. Matt. 10:39
User avatar
Glenn Schroeder
Posts: 1518
Joined: Mon Mar 08, 2021 11:43 am
Answers: 23
Location: southeast Texas
x 1754
x 2126

Re: Monitor dimensions from two sketches with sensor?

Unread post by Glenn Schroeder »

I will confess that I've never used sensors (though I should probably learn), so this may be way off base. Now that I've made that admission, can you insert a sketch in the Assembly, with lines driven by the Part sketches, insert driven dimensions on these lines, and attach the sensor to those driven dimensions?
"On the days when I keep my gratitude higher than my expectations, well, I have really good days."

Ray Wylie Hubbard in his song "Mother Blues"
User avatar
Hansjoerg
Posts: 113
Joined: Thu Apr 01, 2021 4:17 pm
Answers: 3
x 71
x 60

Re: Monitor dimensions from two sketches with sensor?

Unread post by Hansjoerg »

Hello Mike

great solution, basically so simple, but you have to come up with the idea first.
Thanks for sharing the solution.
All the "good" news about SWX makes me feel like I'm driving a truck with two trailers straight into a dead end.
Post Reply