Results 1 to 4 of 4

Thread: Global variables

  1. #1
    Registered
    Join Date
    Jul 2006
    Location
    England
    Posts
    236
    Downloads
    0
    Uploads
    0

    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
    Registered JJDennon's Avatar
    Join Date
    Feb 2011
    Location
    USA
    Posts
    40
    Downloads
    0
    Uploads
    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
    Registered
    Join Date
    Jul 2006
    Location
    England
    Posts
    236
    Downloads
    0
    Uploads
    0
    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
    Registered JJDennon's Avatar
    Join Date
    Feb 2011
    Location
    USA
    Posts
    40
    Downloads
    0
    Uploads
    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: 317
    Last Post: 04-17-2013, 09:17 AM
  2. Global Variable
    By cncboy1 in forum Okuma
    Replies: 16
    Last Post: 01-22-2011, 12:55 AM
  3. Global Warming or Global Governance
    By TMaster in forum Environmental & Alternate Energy
    Replies: 4
    Last Post: 03-18-2008, 10:35 AM

Posting Permissions


 


About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed


Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.