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: 

Adding a value to a property in a custom object

1 REPLY 1
Reply
Message 1 of 2
Anonymous
344 Views, 1 Reply

Adding a value to a property in a custom object

Hi,

 

I am looking for some help with a custom object I have created in Vault 2014. I want to add a value to a property in my custom object, from the API I am using UpdateCustomEntityProperties() I am passing in a customEntityId which gives me an error BadEntityId when I run this code?
// Adds a Property Instance to the Custom Entity
entSvc.UpdateCustomEntityProperties(customEntityId.ToSingleArray(), propDefId.ToSingleArray(), propValue);

Also I need to pass in a propDefIds does this value need to be a GUID value?

Hope that you can point me in the right direction?


Many thanks,

Barry

1 REPLY 1
Message 2 of 2
minkd
in reply to: Anonymous

If you are getting a BadEntityId exception, then the value of your customEntityId variable is not a valid custom entity ID. Where did you get that value from? The propDefIds parameter is an array of longs; so no they are not GUIDs, they are propertyDefinition IDs. But I notice you are sending one value instead of an array of values. The method takes 3 arrays, all of which should be the same size (in your case, the size is 1). Hope this helps, -Dave


Dave Mink
Fusion Lifecycle
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report