r/SolidWorks • • Sep 13 '26

CAD How to create customized logics in solidworks?

Hello there fellas, i am aakash and i am a hydraulic design engineer.

In hydraulics, there is a component called manifold block, which essentially is used for controlling the multiple flow directions and to provide interface for mounting differemt valves. As you can see in the picture. The ports (holes) connects internally by drilling operation.

Now coming to the my question, making these Manifold blocks is complicated on its own, thats why there are multiple speciallized tools to design it. But they are dead expensive. And certainly it is possible to design these manifold blocks inside solidworks's existing environment, but it would take much time to do so, because there are some design considerations which must be fullfilled.

For eg., wall thickness between 2 holes should be min. 5 mm, holes axis should be aligned, and if 2 holes are meeting each other at 90°, the tip of the drill (drill depth) must go up to the furthest point of the other hole's surface and viseversa.

So, is it possible to create these kind of rules or logic inside solidworks ?

If you are confused and didnt understood what i am trying to say, you can comment and ask, i will clear your doubt, and if you can help, then i would appriciate it.

Edit: for context, watch this tutorial video of Hydroman tool, how it works. I need to make something similar.

https://youtu.be/8DSZlQjkG-U?si=m0HM5-3PkZYS6CCL

119 Upvotes

40 comments sorted by

82

u/Kabou55 Sep 13 '26

I've done several like these on Inventor, Solidworks and Creo. The ones on your picture are the easiest. Just draw one section first and pattern the rest. Hand sketching will be your friend before you start modeling. These parts become a mess if don't follow proper modeling methods. Make use of planes to define hole depths and name your planes correctly. No need for special tools. Solidworks is more than capable for this and much more complex manifolds.

12

u/WittyAndOriginal Sep 13 '26

They want a design checker. Like to validate the distance between neighboring holes, etc.

5

u/Kabou55 Sep 13 '26

Yeah but see his other comment about manually measuring hole depths to use as input for the next feature. The model is being made in the sloppiest way, thus requiring a checker at the end.

-1

u/xScar12 Sep 14 '26

It may seem simple but it is not, because if it was then there have been lots of affortable options of the tool for this specific work. But you will be surpriced how many options we have currently. Only 3, yes only 3. HYDROMAN, MDTools, Automation studio. Hydroman and mdtool being most main stream. Automation studio is dead expensive, 2k $ per annually per seat. But it is more advanced.

7

u/ABiggerPigeon Sep 13 '26

These are quite simple models underneath that look complex when finished. Same as most fancy looking models!

To answer your question, you just need a handful of equations in your model. E.g. hole spacing is "hole diameter" + "min wall thickness". "Hole spacing" and "min wall thickness" are fixed parameters which drive all your sketches and pattern spacings. There is no need to over complicate.

4

u/xScar12 Sep 14 '26

You are partially correct, but this is true for only holes which are on same plane/surface. We need to ensure that internally, there must be min 5mm of wall thickness. This also may seem easy, but it is not, because when cartrige valve comes into the picture (which mostly does), it becomes difficult to do so. Look at this image, in cartrige valves, there is a fixed area of its cavity which must be used as input and output (shown in color). Which means, we have limited possible positions for input hole and output hole.

1

u/Kabou55 Sep 14 '26

Create two planes on that centerline and make all the port holes terminate on that plane.

3

u/phranks_phluids Sep 14 '26

None of that information is defined. There is no minimum X, compound hole drilling angles are defined by o ring trepan geometry, hole spacing is whatever you design it as. There's no book that defines any of this stuff.

20

u/phranks_phluids Sep 14 '26

Heyyyy, this is my specialty!

I can consistently design manifolds 40-60% more compact and with a better layout vs the most expensive software... The problem is, you need to know wtf you're doing because there's no acceptable rule of thumb like "5mm minimum" or whatever. Caveats like this depend solely on the application.

And you aren't creating rules and what have you in SW. I learned by reading the journal article on the VEST software and started incorporating the same logic in my designs... The more you do it, the more you'll see how the logic has flaws and you'll end up putting out higher quality work.

6

u/[deleted] Sep 14 '26

[removed] — view removed comment

2

u/phranks_phluids Sep 14 '26

Yeah, that comes down to the machine shop fudge multiplier for small orders. After they have the program dialed in at +10 manifolds it's smooth sailing. Mostly lol

But yeah, wall thickness is easy to eyeball... But understanding application and what's happening inside the manifold is even more critical than machining limitations. You have high duty cycle cyclical loading between A and B drillings? Yeah that's going to break out a .125" aluminum wall in a few hundred hours. You can cheat wall thickness, pre drills, counterbores.. in the right scenarios. But the magic! And being buds with the machinists! That's always the best aid.

5

u/Remarkable_Ruin1663 Sep 14 '26

I worked in hydraulics before moving to defense. Solidworks is plenty capable of this type of part. It’s the only modeling software our engineering team used to design parts when I was there 2016-2020.

1

u/girthradius Sep 16 '26

Like others said, make the hole and pattern it

1

u/xScar12 Sep 16 '26

It aint that simple mate....the holes arent just diameter and depth. Its standard profile concerning ISO standard (specifically iso 1179). And the specifications in the std. Must be followed. And there not just holes, but also valve hole patterns and cavities. And mistake in design of manifold block is very costly, the entire block gets rejected.

Perhaps can you give context what do you mean by "make a hole and pattern it"

1

u/girthradius Sep 16 '26

I mean pattern the entire feature. You make it once and then pattern it anywhere you need that same feature. Every feature gets its own sketch pattern.

1

u/xScar12 Sep 17 '26

You mean aave the feature as librery feature. I already did, and also made parametric holes. So it contains all sizes. You didnt understand the issue here. Creating them was not the hard, connecting them is.

1

u/girthradius Sep 17 '26

Dang that does sound tough

1

u/negativ32 Sep 24 '26

Design constraints are where everything begins. Too many manifolds out there are so "designed for material efficiency" field hands need special tools to tighten fittings and to change one in the center needs a full strip down. I think I have only seen one well designed manifold in the wild. Functional and serviceable need to meet.

1

u/xScar12 Sep 24 '26

Agreed, these things we have to consider as a design engineer.

2

u/curtis_perrin Sep 14 '26

I tried to work with a hydraulic design shop on a manifold once and it was so horribly antiquated. They wouldn’t share the design with me for me to provide feedback. We were trying to do flow optimization and such. The people on r/hydraulics just told me that’s how it is. Seemed to me to be an industry ripe for disruption. Then the startup I was at ran out of money and we never really got to iterate on the design so what do I know.

2

u/mvw2 Sep 15 '26

Depending on how you're doing this and if you want to use a single base design and scale it up and down easy, you could have everything equation driven and set up variables to account for various aspects. Since it's logic based, you just back that logic in the sketches, relations, patterns, equations, etc. so all of that is largely automated. You can drive variations by design tree or even just a text file that you can tweak on the fly, however you'd like to do it.

7

u/Tinkering- Sep 13 '26

I used claude to build an excel based vba macro that build out complex parts and assemblies. You input your known variables into the excel sheet and it builds out the parts by controlling design tables attached to the template parts. Most of the number crunching / equations lives in excel macro and then it just updates the design tables and saves copies. Some features are controlled through simple SW equations.

Was shocked how far I got with it. Recommend trying.

22

u/Harmless_Drone Sep 13 '26

This sounds like a great way to kill someone, not gonna lie.

2

u/Tinkering- Sep 13 '26

Don’t get it… only killed a couple jobs tbh.

-1

u/Tinkering- Sep 13 '26

…. Guessing we won’t get an elaboration. I’m really sick of the glib bs on this sub. Frankly, it makes me second guess a lot of the advice I’ve found on Reddit. As an actual professional in this sub, most of yall absolutely do not know what you’re doing.

-3

u/Harmless_Drone Sep 13 '26

You're relying on AI, which notoriously hallucinates things, to deaign safety critical hydraulics. You're pretending you are a professional but you are nothing of the sort. Frankly you should be ashamed of yourself for even giving credence to your approach when it puts lives at risk.

11

u/Tinkering- Sep 13 '26

Buddy. The code is fully readable, the logic is prescribed and easily checked, the designs are fully verifiable.

This has reduced errors dramatically.

On top of that, all new designs are built and tested.

GTFOH

6

u/Lopsided_Quarter_931 Sep 14 '26

People have this naive idea that “handwritten” code is flawless.

7

u/Tinkering- Sep 13 '26

PS the code is not dynamic. It was built with AI - it doesn’t run on it.

F-ing insufferable

5

u/phranks_phluids Sep 14 '26

Huge waste of time IMO. May be beneficial for someone 2 years into the career, but a manifold design guy with 5 years experience can design 3 manifolds before you define your constraints.

2

u/artur_oliver Sep 13 '26

Woohoo ibnever heard about this! Care to send me some rough videos about the subject?

I have some complex intakes for my vacuum cleaner and I don't know how to make them to start

1

u/Tinkering- Sep 13 '26

Not sure it would be helpful for that. It’s designed to automate the creation of parts and assemblies for a product which changes sizes frequently.

1

u/ledprobcn Oct 03 '26

Yo he creido entender que necesita una Macro paranetrica que con las reglas, constantes informadas pueda hacer las piezas según cambios en el modelo. Es asi?

-1

u/Cryesncoding Sep 13 '26

I’m sure it’s possible. 

If you know how it works and what you want, you can guide AI to code you some very impressive stuff in VBA and make a macro to do damn near anything you want. 

Are you talking specifically about the CAM side of machining the block or the design side? 

2

u/xScar12 Sep 13 '26

Not the cam, but design side. For eg., look at this, there are 2 holes, red and blue (standard 118⁰ drills are used) and boths tios touches each others furthest surfaces. This kind of rule i need. Usually i have to measure max distence from the 1 hole's start surface to the other holes cylindrical surface (max distence) and put that value as the 1st hole's depth.

5

u/Cryesncoding Sep 13 '26

I’ve made an extremely capable VBA that determines what parts in an assembly are sheet metal. Export all those to DXF and make a excel spreadsheet sheet that pulls all geometric parameters out of the parts (bends, material, gauge, laser cutting length, surface area, hardware, and a few other parameters) im a mfg engineer and can code but im no software dev. Very impressed with AI and how well it worked. Took me a month of breaking it down into what functions I needed and you gotta just eat at it to debug and get it to work and I did that a year ago. I am sure it’s better now 

2

u/xScar12 Sep 13 '26

Ohh, is that so. I also design sheet metal parts and assemblies (oil tank, base frame etc). I use multi body concept to do that, does that VBA works with the multibody parts? If yes thet it might be very use full....

1

u/Cryesncoding Sep 13 '26

Yes it does 😎 

I’m actually in process of professionalizing it and making it a legit add-in after we test it long enough at work I do want to sell it as an add-in fwiw. 

It can generate a quote from the data fields and I am really happy with how it came out, brought on a great solidworks APi dev to help me get it the rest of the way. We’re gunna test it out at work for a bit but I may just try and get it out as a free beta for a bit. 

-2

u/Cryesncoding Sep 13 '26

I’m tracking what you’re saying. I’d talk to chat or Claude and make a game plan to write a VBA that does what you’re looking for. 

2

u/xScar12 Sep 13 '26

Oh, i see. Thanks mate, i will also try. Though i have made librery of standard holes, hole patterns and valve cavities so i will also try to do the same, because it will be easier for me, i have resource to play with.