587,333 active members*
3,045 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1

    Global variables

    I am using SW2011 and I am having a problem with global variables in an assembly.
    I can create a global variable in the assembly equation table such as :-
    "length"=250
    But when I try to access the same variable from within a part in the assembly, the global variable is not available in the part equation table.
    I can create an external text file with the global variables in, and I can access this from any parts that need access.
    But it seems a bit long winded way to go about it.
    So, is it possible to access the assembly global variable from within a part stored in the assembly?
    Hope I have made myself clear!

    Thanks

    Andy

  2. #2
    Join Date
    Feb 2011
    Posts
    0

    Lightbulb

    Quote Originally Posted by Normsthename View Post
    I am using SW2011 and I am having a problem with global variables in an assembly.
    I can create a global variable in the assembly equation table such as :-

    But when I try to access the same variable from within a part in the assembly, the global variable is not available in the part equation table.
    I can create an external text file with the global variables in, and I can access this from any parts that need access.
    But it seems a bit long winded way to go about it.
    So, is it possible to access the assembly global variable from within a part stored in the assembly?
    Hope I have made myself clear!

    Thanks

    Andy
    Andy, is the global variable inside a sub assembly or is it in the top level assembly?

    I don't know the answer to your question but maybe you need to "define" the global in each assembly in which you want to use it, or define it in the top level assembly so it propagates down.

    Give it a shot and let us know if it works!

  3. #3
    is the global variable inside a sub assembly or is it in the top level assembly?
    The global variable is stored in the assembly (top level)
    I want to be able to call that variable from within a part that is stored in the same assembly.

    Andy

  4. #4
    Join Date
    Feb 2011
    Posts
    0
    Quote Originally Posted by Normsthename View Post
    The global variable is stored in the assembly (top level)
    I want to be able to call that variable from within a part that is stored in the same assembly.

    Andy
    If you define the same global in your part, and change the one in your assembly does it change the value in your part to be the same as the other one?

Similar Threads

  1. Its all very well to talk about global warming, but....
    By ynneb in forum Environmental / Alternate Energy
    Replies: 318
    Last Post: 04-17-2013, 02:17 PM
  2. Global Variable
    By cncboy1 in forum Okuma
    Replies: 16
    Last Post: 01-22-2011, 06:55 AM
  3. Global Warming or Global Governance
    By TMaster in forum Environmental / Alternate Energy
    Replies: 4
    Last Post: 03-18-2008, 03:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •