Global Variables in Assemblies

I'm trying to figure out how I can set variables in my main assembly and then be able to select that variable value as a linked dimension when dimensioning new parts in the assembly. So far the only way I can get my variables to to show up is if I put them in the individual models. Whats up?

Reply to
jared
Loading thread data ...

What I think you mean by "variable" is called a linked value in SolidWorks. Linked values are limited in scope to the document being edited. If you edit a component within an assembly, linked values will be limited to that component.

There is no way to automatically make a value in an assembly available in all referenced documents. This would be a good enhancement request.

If you create a matching linked value a the component, you can drive that with an equation in the assembly. You will need one equation for each component that needs the value. A third option involves externally linked design tables referencing each other, but that's so ugly I've never heard of anyone actually using it. A few have tried to implement it, but I never heard a report of success.

You can create in-context references of some kind on a per-use basis, such as equal length constraints, etc. This would be the method implemented in skeletal modeling techniques. I would recommend looking up skeleton models in the best practices section of the customer service portal. Maybe they call it tips and tricks now. At any rate, skeletal modeling seems to be the best way to take advantage of the tools available in SolidWorks.

Reply to
Dale Dunn

Dale, Thanks, I'll stop pulling my hair out now. I guess I could just create a sketch in the assembly that contains lines that will represent all the different variables that I need and then just create in context relations when creating the individual models. I'll also check out the skeletal modeling.

Reply to
jared

It sounds like you've got the basics of the idea. Take all those different length lines and rearrange them into a layout sketch, and you'll be almost there. Put the layout sketch into a skeleton part so you can insert it into subassemblies. That way you can edit your subassemblies without loading the top level assembly.

Reply to
Dale Dunn

That makes great sense, thanks again.

Reply to
jared

Hi Dale,

I use a skeleton sketch part as well but this conversation reminds me of MDT which had a great global variable system. First, you had a text file whose name and location was a document option in the file. Into this text file you typed anything you wanted - one variable per line. i.e. wall = .08. Then, as you were dimensioning a sketch the dynamic dimension would display as "d4 =" and you could just type "wall" and hit enter. (the 4 would be a variable number - incrementing as you added dims). Other by-products of this great system were the ability to easily reference other dims i.e. after entering d4 = wall (which would evaluate to .08) you could edit it to say wall + .01 - and it would PRESERVE that numeral as you entered it. So, months later you could edit a part an see something like d4 = wall + .06 - .

02 or whatever.

The next usage of this system was you could reference other dims as simply as entering d5 = d4 / 2 or any other common mathematical functions. It's hard to convey how simple and elegant this system was compared to solidworks method of link values and the equation editor (although the down arrow tip helps a lot!).

Zander

Reply to
Zander

Dont know how many parts you have in your assemblies.

If it more than a few hundreds I suggest you remove all external references after you are done with the construction, and then fully define them manually afterwards.

The way the above usage of skeleton parts is described it is very good for smaller assemblies with only on person working on it.

Reply to
Ronni

Interesting. I would think that skeleton modeling would be essential for managing a large project with several designers. Is performace the primary limitation?

Reply to
Dale Dunn

Yes it is related to performance.

We do use skeleton parts as well. But we use them more to have the different sub-assemblies defined according to origo.

Basically we have a sketches on different planes on the skeleton planes. To keep the overview. And then each sub-assembly has the skeleton part as its first part.

In this way we use the skeleton part to keep the design overview, basically we just use it for placement (make an external mate to place it and then delete the external mate, and remating it to the 3 standard planes). This also allow us to compare any sub-assemblies in a new assembly, by simply dragging them into origo.

We have to do this to have a chance to work at all. When done with the construction, we make as-build parts of the assemblies and collect these in a top assembly (saving each assembly as a part). Otherwise we cannot open it. We just made one of the biggest Flexo Printers in the world, and are just working on being able to make some top-assemblies that can be used for documentation.

Our sub-assemblies can be up to 10k parts, and the top assembly could be more than 100k parts (though only 15k different parts).

For those interested, please take a peak :-)

formatting link

Reply to
Ronni

I believe that may qualify for the "large" assembly category. Also, you have confirmed how I expected skeleton parts would work in such a project.

Reply to
Dale Dunn

UG also works something like this. Great feature. I sure wish Solidworks would add this type of functionality rather than all the eye candy.

Reply to
ed_1001

Yup NX works this way. I'm a SW Lover that sometimes uses NX and its got a great system in this regard. I think the main issue with SW is that it calculates it upon entry instead of accepting it as an equation instead (if that makes sense).

I've wanted SW to have this kind of functionality since i first started using it. I've often created releifs for sheet metal style parts and wanted to type "Thickness" + 0.1 and have it remember that, but i can't! :P

When SW got the feature of having global variables i thought "this is it, sweet!". But alas... this wasn't it.

-DWH

Reply to
Anonymous

(if that makes sense).

Yep. I've run into this "global variable" problem. I'm new to SW so I might be doing something wrong but I can't seem to create external references to equations or linked values that exist in other parts. So there doesn't seem to be any way of creating true "global" variables in SW.

I'm resorting to "solving" the problem by creating a "variables.SLDPRT" that has sketches with construction lines or circles with dimensions attached and then externally referencing these dimensions through equal length constraints. The problem with this is sometimes you don't want "equal" instead you may want D1+.001 to account for an interference fit or something. Then you have to either add a secondary equation to a construction item that is equal in order to add +.001 or you have to make a really complicated tangential construction configuration with a "distance between" dimension to .001. The tangent/ construction is necessary to constrain the solution to be on the desired side of the line or circle. A total pain! (The secondary equation is easier.)

What SW needs is the concept of a "project" and any part or assembly created as a member of the project would have a scope of equations, design table elements and variables that reference the project. FOr instance, "D1@Sketch1"=Diameter@Project would reference the equation or design table element named "Diameter" that was designed for the project.

my frustrated $0.02.

Reply to
druberego

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.