• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Inventor Customization

    Reply
    Valued Contributor
    schae235
    Posts: 59
    Registered: ‎05-24-2011

    Basic iLogic coding question

    91 Views, 1 Replies
    11-28-2011 01:45 PM

    I am sure this is a super basic question:

    I want a loop to run throught and change the vendor properties in an assembly.  That being said I'm not always sure the number of parts I will be changeing and have a loop running with a counter.  Since all the parts are in a similar format ( part:1,part:2, etc) I have a counter and a loop going to change all the parts until I get an error.   I am trying to get Inventor to exit the loop on error but I can't think of the code needed.  any help would be appreciated.  Thanks

     

    INV 2012 SP1
    Windows 7 64 Bit
    ATI FirePro V5800
    14.0 GB RAM
    Please use plain text.
    Employee
    Posts: 932
    Registered: ‎02-24-2009

    Re: Basic iLogic coding question

    11-30-2011 03:04 PM in reply to: schae235

    If you're using a For loop, then Exit For will get you out of the loop.

    In a Do loop,  use Exit Do

    In a While loop, use Exit While

    http://msdn.microsoft.com/en-us/library/t2at9t47(v=vs.80).aspx



    Mike Deck
    Software Developer
    DLS - Mechanical Design
    Autodesk, Inc.

    Please use plain text.