Search code examples
apiadd-insolidworks

Shared variable among parts


I have multiple parts based on the same length. If the assembly is 400mm wide, part1 is 200mm, part2 is 180mm and part 3 is 150mm. It would be great if I could declare the length of those parts as (respectively) al-200, al-220 and al-250 (where al is the length of the assembly).

Can I store this value somewhere to be used among multiple parts? The assembly is getting bigger pretty fast and I'm not looking forward to changing 20 sizes just because the assembly is going to be a slightly different size.

If a shared variable isn't possible, can I achieve something like this using an add-in?

Using SolidWorks 2015 SP1.1.


Solution

  • basically, you can share "Global variable" from top assembly and link dimensions to this variable:top-down var

    link from part

    Link sketch dimension to top assembly "Global Variable"

    Hope this help!