Global Variable controlling thread depth

Use this space to ask how to do whatever you're trying to use SolidWorks to do.
User avatar
DanPihlaja
Posts: 757
Joined: Thu Mar 11, 2021 9:33 am
Answers: 24
Location: Traverse City, MI
x 744
x 902

Global Variable controlling thread depth

Unread post by DanPihlaja »

So, I have a hole wizard that is making 2 holes.

The holes are 7/16-20 thread. I wold like to control the thread depth with a global variable.

When I select the hole, I can see the dimension that controls thread depth.
image.png
When I double click on that dimension and assign its value to equal a global variable, it doesn't update.
It shows that it has an equation, but it still uses the value from the hole wizard.

It even shows that it is assigned in the equation manager:
image.png
Unfortunately, the hole wizard isn't smart enough that I can assign the global variable from right inside the form.

I can't get it to work.
Attachments
image.png
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
DanPihlaja
Posts: 757
Joined: Thu Mar 11, 2021 9:33 am
Answers: 24
Location: Traverse City, MI
x 744
x 902

Re: Global Variable controlling thread depth

Unread post by DanPihlaja »

OK, so I was successfully able to use a regular cut and then manually inserting a cosmetic thread.
image.png
But when I edit the cosmetic thread, it isn't greyed out like other forms are.
image.png
In fact, if I then change it, it overrides the dimension until I manually re-edit the dimension (without actually changing it).

Its like the form and the equation manager aren't speaking to each other.

This is obviously a hodge-podge of programming just jammed together without verifying that it works together. *sigh*

Its not a game-ender. I was just wondering if it could be done.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
mattpeneguy
Posts: 1380
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2487
x 1888

Re: Global Variable controlling thread depth

Unread post by mattpeneguy »

dpihlaja wrote: Fri Oct 15, 2021 10:50 am OK, so I was successfully able to use a regular cut and then manually inserting a cosmetic thread.

image.png

But when I edit the cosmetic thread, it isn't greyed out like other forms are.

image.png

In fact, if I then change it, it overrides the dimension until I manually re-edit the dimension (without actually changing it).

Its like the form and the equation manager aren't speaking to each other.

This is obviously a hodge-podge of programming just jammed together without verifying that it works together. *sigh*

Its not a game-ender. I was just wondering if it could be done.
Yes. It can be done. Manually. In the drawing....
User avatar
Glenn Schroeder
Posts: 1451
Joined: Mon Mar 08, 2021 11:43 am
Answers: 22
Location: southeast Texas
x 1641
x 2050

Re: Global Variable controlling thread depth

Unread post by Glenn Schroeder »

Can you double-click on the dimension to bring up the Modify Dimension box, enter the equal sign, then select the global variable from the drop-down?

image.png
"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"
Uncle_Hairball
Posts: 179
Joined: Fri Mar 19, 2021 12:21 pm
Answers: 2
x 27
x 90

Re: Global Variable controlling thread depth

Unread post by Uncle_Hairball »

I'm curious as to how you got the hole wizard to add cosmetic threads.

Also, you're selecting the cosmetic thread, not the sketched geometry. Might this have something to do with your difficulties?
User avatar
AlexB
Posts: 448
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 24
x 243
x 398

Re: Global Variable controlling thread depth

Unread post by AlexB »

Uncle_Hairball wrote: Fri Oct 15, 2021 12:27 pm I'm curious as to how you got the hole wizard to add cosmetic threads.

Also, you're selecting the cosmetic thread, not the sketched geometry. Might this have something to do with your difficulties?
At the very bottom of your hole wizard feature, click this:
image.png
image.png (6.97 KiB) Viewed 2142 times
Uncle_Hairball
Posts: 179
Joined: Fri Mar 19, 2021 12:21 pm
Answers: 2
x 27
x 90

Re: Global Variable controlling thread depth

Unread post by Uncle_Hairball »

AlexB wrote: Fri Oct 15, 2021 3:30 pm At the very bottom of your hole wizard feature, click this:
image.png
Interesting, mine creates the cosmetic thread, but nothing displays on the part.
User avatar
SPerman
Posts: 1861
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 13
x 2037
x 1701
Contact:

Re: Global Variable controlling thread depth

Unread post by SPerman »

It doesn't show up if you have annotations turned off.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
AlexB
Posts: 448
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 24
x 243
x 398

Re: Global Variable controlling thread depth

Unread post by AlexB »

Uncle_Hairball wrote: Fri Oct 15, 2021 3:34 pm Interesting, mine creates the cosmetic thread, but nothing displays on the part.
Other than what's been said above. If you're asking how to show the threads in the model window, this option should be checked in the document properties.
image.png
User avatar
jcapriotti
Posts: 1794
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1135
x 1940

Re: Global Variable controlling thread depth

Unread post by jcapriotti »

I usually turn on the Shaded cosmetic threads but leave the other off since it can get busy in assemblies with little dotted circles everywhere. It's better than it used to be since they added the global annotation overrides though.
image.png
image.png (26.68 KiB) Viewed 2125 times
Jason
User avatar
DanPihlaja
Posts: 757
Joined: Thu Mar 11, 2021 9:33 am
Answers: 24
Location: Traverse City, MI
x 744
x 902

Re: Global Variable controlling thread depth

Unread post by DanPihlaja »

Glenn Schroeder wrote: Fri Oct 15, 2021 11:35 am Can you double-click on the dimension to bring up the Modify Dimension box, enter the equal sign, then select the global variable from the drop-down?


image.png
That works for the hole depth, but not the thread depth.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
AlexB
Posts: 448
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 24
x 243
x 398

Re: Global Variable controlling thread depth

Unread post by AlexB »

dpihlaja wrote: Mon Oct 18, 2021 8:36 am That works for the hole depth, but not the thread depth.
Yeah, I tried to replicate this with 2018 SP5. The global variable changing does not cause the hole wizard thread to rebuild. I can't even get it to update by editing the feature after modifying the global variable. Not sure why this specific scenario is so broken, good find!
User avatar
DanPihlaja
Posts: 757
Joined: Thu Mar 11, 2021 9:33 am
Answers: 24
Location: Traverse City, MI
x 744
x 902

Re: Global Variable controlling thread depth

Unread post by DanPihlaja »

AlexB wrote: Mon Oct 18, 2021 9:03 am Yeah, I tried to replicate this with 2018 SP5. The global variable changing does not cause the hole wizard thread to rebuild. I can't even get it to update by editing the feature after modifying the global variable. Not sure why this specific scenario is so broken, good find!
Yeah, that is the same problem that I am having.

I forgot to mention that I am also using SW 2018 SP5.

Thanks for looking into it!
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
DanPihlaja
Posts: 757
Joined: Thu Mar 11, 2021 9:33 am
Answers: 24
Location: Traverse City, MI
x 744
x 902

Re: Global Variable controlling thread depth

Unread post by DanPihlaja »

So, I broke down and asked the same question on the 3DSWYMP forum

Not sure if this link will work, but here it is...


https://r1132100503382-eu1-3dswym.3dexp ... yeOj3OBb5w
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
mike miller
Posts: 878
Joined: Fri Mar 12, 2021 3:38 pm
Answers: 7
Location: Michigan
x 1070
x 1232
Contact:

Re: Global Variable controlling thread depth

Unread post by mike miller »

dpihlaja wrote: Tue Oct 19, 2021 11:35 am So, I broke down and asked the same question on the 3DSWYMP forum

Not sure if this link will work, but here it is...


https://r1132100503382-eu1-3dswym.3dexp ... yeOj3OBb5w
First off, how dare you?!? :lol:
With that off my chest..............if only they would allow "Up to Surface" for threads, AND a variable for thread depth. hhhh

Another thought: have you tried Advanced Hole? I have to confess, every time I try it I get lost in the interface and just give up.
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
JSculley
Posts: 586
Joined: Tue May 04, 2021 7:28 am
Answers: 54
x 7
x 821

Re: Global Variable controlling thread depth

Unread post by JSculley »

I replied to the SWYMP post. You can link the cosmetic thread depth to a global variable with no issues in 2021 SP4. So, somewhere between 2018 SP5 and 2021 SP4 the problem was fixed it seems.
User avatar
DanPihlaja
Posts: 757
Joined: Thu Mar 11, 2021 9:33 am
Answers: 24
Location: Traverse City, MI
x 744
x 902

Re: Global Variable controlling thread depth

Unread post by DanPihlaja »

mike miller wrote: Tue Oct 19, 2021 11:48 am First off, how dare you?!? :lol:
With that off my chest..............if only they would allow "Up to Surface" for threads, AND a variable for thread depth. hhhh

Another thought: have you tried Advanced Hole? I have to confess, every time I try it I get lost in the interface and just give up.
No, I haven't tried advanced hole. Advanced hole makes no sense to me whatsoever.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
MJuric
Posts: 1067
Joined: Mon Mar 08, 2021 3:21 pm
Answers: 1
x 31
x 873

Re: Global Variable controlling thread depth

Unread post by MJuric »

dpihlaja wrote: Tue Oct 19, 2021 1:28 pm No, I haven't tried advanced hole. Advanced hole makes no sense to me whatsoever.
Advanced holes are yet ANOTHER feature that is 95% complete. Advanced holes are great for "Complex" holes. So for anything that has more than a couple features I use advanced holes. So say I have a thru hole that is tapped thru, has two countersinks on one side and a counter sink on the opposite side you can build that hole all in one feature with advanced holes....but when you get to the drawing trying to get it all into a single callout ends up being a challenge at best to a complete nightmare at worse.

So you can do this in a single feature.
image.png
But in order to get the callout on the print you actually have to manually fill the call outs for every item.
image.png
image.png (21.69 KiB) Viewed 2009 times
And in order to actually make it parametric you actually have to put in all the callouts like <MOD-DIAM> etc etc and they are not all the same as regular holes....so it's a bit of a PIA.

This is what you get if you DON'T fill all that out if you put a hole callout on it.
image.png
Helpful, am I right?

So would it not have made sense to use similar or the same callouts as in the hole wizard and just filling each feature? So instead of putting in "Nearside Counterbore" how hard would it have been to put in the proper code to get diameter, size, depth for each level the same way it's done in the hole wizard?
User avatar
DanPihlaja
Posts: 757
Joined: Thu Mar 11, 2021 9:33 am
Answers: 24
Location: Traverse City, MI
x 744
x 902

Re: Global Variable controlling thread depth

Unread post by DanPihlaja »

MJuric wrote: Tue Oct 19, 2021 1:47 pm ....

So would it not have made sense to use similar or the same callouts as in the hole wizard and just filling each feature? So instead of putting in "Nearside Counterbore" how hard would it have been to put in the proper code to get diameter, size, depth for each level the same way it's done in the hole wizard?
This is exactly the part that makes no sense to me.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
MJuric
Posts: 1067
Joined: Mon Mar 08, 2021 3:21 pm
Answers: 1
x 31
x 873

Re: Global Variable controlling thread depth

Unread post by MJuric »

dpihlaja wrote: Tue Oct 19, 2021 2:46 pm This is exactly the part that makes no sense to me.
This seems to be Solidworks MO. I wonder if their program managers and developers are all non medicated ADHD. "Hey I have this really cool idea....Squirrel" There is SOooo much in this program that is not quite completed and never seems to get there.

Advanced hole should have been just part of the hole wizard. You have all your normal stuff and then an "Advanced" option where upi get to "Build a hole" and then throw a hole callout on it....let's just say it's not that.

I had a co-worker came up to me today asking me how I'd do a hole similar to the above. It was something like a tapped hole thru with a couple other features. I told him to play with advanced hole and the play with just using hole wizard and doing cuts for the other feature and see which one "Sucked less" to him :D
User avatar
SPerman
Posts: 1861
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 13
x 2037
x 1701
Contact:

Re: Global Variable controlling thread depth

Unread post by SPerman »

It is as if they hire a different programmer for every feature, and then forbid them to see how similar features are implemented.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
DanPihlaja
Posts: 757
Joined: Thu Mar 11, 2021 9:33 am
Answers: 24
Location: Traverse City, MI
x 744
x 902

Re: Global Variable controlling thread depth

Unread post by DanPihlaja »

MJuric wrote: Tue Oct 19, 2021 2:58 pm This seems to be Solidworks MO. I wonder if their program managers and developers are all non medicated ADHD. "Hey I have this really cool idea....Squirrel" There is SOooo much in this program that is not quite completed and never seems to get there.

Advanced hole should have been just part of the hole wizard. You have all your normal stuff and then an "Advanced" option where upi get to "Build a hole" and then throw a hole callout on it....let's just say it's not that.

I had a co-worker came up to me today asking me how I'd do a hole similar to the above. It was something like a tapped hole thru with a couple other features. I told him to play with advanced hole and the play with just using hole wizard and doing cuts for the other feature and see which one "Sucked less" to him :D
Honestly, it would be easier and more accurate to use the hole wizard 4 different times in the same location

Then add 4 separate hole callouts to the drawing, then add a single dimension and link all the hole callouts inside that one dimension, then hide the 4 hole callouts.

Then there is not messing with what the callout is supposed to be.

(this is what I do now)
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
SPerman
Posts: 1861
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 13
x 2037
x 1701
Contact:

Re: Global Variable controlling thread depth

Unread post by SPerman »

If I have to dimension something like this, I am creating a section view and dimensioning it there. Maybe it's because I'm not trained draftsman, but I don't trust a machinist to properly interpret a stack of 5 diameters and depths. (Of course in this day 99% of the programming is being done from the model, so the confusion should be at a minimum.)

image.png
image.png (69.21 KiB) Viewed 1976 times
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
MJuric
Posts: 1067
Joined: Mon Mar 08, 2021 3:21 pm
Answers: 1
x 31
x 873

Re: Global Variable controlling thread depth

Unread post by MJuric »

SPerman wrote: Tue Oct 19, 2021 4:08 pm If I have to dimension something like this, I am creating a section view and dimensioning it there. Maybe it's because I'm not trained draftsman, but I don't trust a machinist to properly interpret a stack of 5 diameters and depths. (Of course in this day 99% of the programming is being done from the model, so the confusion should be at a minimum.)
I agree and for the most part what I do. When I do that the advanced hole wizard actually works perfectly. You can do a really complex bore/hole and then just manually dimension it. In the model it's a single feature.
Post Reply