• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Autodesk Vault Customization

    Reply
    Contributor
    Gerard.Treacy
    Posts: 14
    Registered: 07-21-2010

    Change Order Events

    62 Views, 1 Replies
    01-09-2012 04:26 AM

    I want to modify the Restrict Operations sample code to include a check before the state changes to Aproved.  The UpdateChangeOrderLifecycleState event fires for all state changes - is there some way to fire only for state change to Approved? Any advice or sample code very much appreciated.

    Employee
    Posts: 414
    Registered: 12-12-2006

    Re: Change Order Events

    01-09-2012 06:36 AM in reply to: Gerard.Treacy

    Yes, you will get events for all Change Order state changes.  That's the way it's designed to work.

    If you are only interested in Approved changes, you will need to look at the event args and filter out all events that you don't care about.

     

    Here is a blog article that contains some more sample code.  It deals with file lifecycle states, which is a different set of APIs, but it shows how to filter based on event args.



    Doug Redmond
    Software Engineer
    Autodesk, Inc.
    http://justonesandzeros.typepad.com/