Global Variables in Assemblies

Discussion in 'SolidWorks' started by jared, Apr 16, 2007.

  1. jared

    jared Guest

    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?
     
    jared, Apr 16, 2007
    #1
  2. jared

    Dale Dunn Guest

    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.
     
    Dale Dunn, Apr 16, 2007
    #2
  3. jared

    jared Guest

    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.
     
    jared, Apr 16, 2007
    #3
  4. jared

    Dale Dunn Guest

    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.
     
    Dale Dunn, Apr 16, 2007
    #4
  5. jared

    jared Guest

    That makes great sense, thanks again.
     
    jared, Apr 16, 2007
    #5
  6. jared

    Zander Guest

    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
     
    Zander, Apr 17, 2007
    #6
  7. jared

    Ronni Guest

    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.
     
    Ronni, Apr 17, 2007
    #7
  8. jared

    Dale Dunn Guest

    The way the above usage of skeleton parts is described it is very good
    Interesting. I would think that skeleton modeling would be essential for
    managing a large project with several designers. Is performace the primary
    limitation?
     
    Dale Dunn, Apr 17, 2007
    #8
  9. jared

    Ronni Guest

    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 :)
    http://www.tresu-converting.com/
     
    Ronni, Apr 17, 2007
    #9
  10. jared

    Dale Dunn Guest

    Our sub-assemblies can be up to 10k parts, and the top assembly could
    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.
     
    Dale Dunn, Apr 17, 2007
    #10
  11. jared

    ed_1001 Guest

    UG also works something like this. Great feature. I sure wish
    Solidworks would add this type of functionality rather than all the
    eye candy.
     
    ed_1001, Apr 17, 2007
    #11
  12. jared

    druberego Guest

    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.
     
    druberego, Jun 8, 2007
    #12
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.