Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Accessing Custom Change Order property values

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
desidubajic
574 Views, 3 Replies

Accessing Custom Change Order property values

Vault Professional 2014.

 

Vault allows you to create custom Change Order properties by going into ”Tools/Administration/Vault Settings”, Clicking on the “Change Orders” Tab and Clicking the “Properties” button under “Link Properties”.

 

Once created and active, these properties can be viewed and edited within the Change Order records tab. Each Item can contain a unique value within each property. These properties only exist within the Change Order.

 

How then, do I extract these values programmatically knowing the Change Order ID and a list of referenced Item ID’s? I used the ChangeOrder.ItemIdArray to get a list of items referenced by the Change Order.

 

I managed to find the definitions’ for these custom properties using …PropertyService.GetAllAssociationPropertyDefinitions().

This gives me an ID number for the property itself, just not sure where to apply it?

3 REPLIES 3
Message 2 of 4
minkd
in reply to: desidubajic

There is a method in the ChangeOrderService:

    AssocPropItem[] GetChangeOrderAssociationProperties( long[] changeOrderIds, long[] propertyListIds, long[] itemListIds )

 

-Dave



Dave Mink
Fusion Lifecycle
Autodesk, Inc.
Message 3 of 4
desidubajic
in reply to: desidubajic

Just what I needed. Unfortunately it doesn't seem to work. I made multiple attempts using the eco, custom definition and item arrays extrqcted from the change order, but get null result for every attempt.

 

I did the following to test the function. Found an ECO that contains multiple items most with values in at least one of the defined custom fields.

Name: ECO-2013-77 ID: 210262

 

I used ChangeOrderService.GetAllChangeOrderAssociationPropertyDefinitions() to obtain a list of custom definitions.

Name: ECO Comments ID: 104. This custom field was filled in for most items in the change order.

 

Finally grabbed a single item that was in the records table in the change order that contained a string value in the ECO comments field.

Name: Rain Cover ID: 238994

 

The following code should have produced a single AssocPropItem instance.

 

AssocPropItem[] props = WSM.ChangeOrderService.GetChangeOrderAssociationProperties(new long[] { 210262 }, new long[] { 104 }, new long[] { 238994 });

 

produces a null. As does any combination of values I come up with. I don't think I'm doing anything wrong, however I get nothing but null as a return value.

Message 4 of 4
desidubajic
in reply to: minkd

This function does work. Thanks.

 

The only point of confusion was that the third paramater long[] itemListIds would be clearer if it was labeled long[] itemListMasterIds. It would also be handier if the two methods available to extract the items "referenced" by the ECO would provide said Master Id's instead of the Base Id's they do provide.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report