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: 

VltExplorerUtil.UpdateFileProperties error

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
martijnvangiels
552 Views, 2 Replies

VltExplorerUtil.UpdateFileProperties error

Hi,

 

From an event handler exension, running  in Vault explorer I need to update Vault properties.

I want this to accomplish by : VltExplorerUtil.UpdateFileProperties(LatestVersion, propstoupdate);

 

This function crashes random. Sometimes it works, sometine it fails. Don't know why. If failed, then simply returns error "could not update properties"

Anyone know why and how to solve?

 

 

To solve I want to try get vltexplorerUtil object using ExplorerLoader.GetExplorerUtil(Iapplication) instead of ExplorerLoader.LoadExplorerUtil as suggested by Doug Redmond

http://justonesandzeros.typepad.com/blog/2011/09/autodeskconnectivityexplorerextensibilitytoolsdll.h...

 

My next question : How to get the Iapplication object to pass as argument in an event handler extension

 

 

I a regular vault extension you need to implement interface :IExplorerExtension

the Application object is then passed in this void:

public void OnLogOn(IApplication application)

 

 

However this concerns a event handler which does not implement this interface :IExplorerExtension

How to get the application object?

 

 

So I have 2 questions:

@1Updateproperties function crashes random. Don't know why. simply return error could not update properties...

@2how to get Iapplication object to use as argument in ExplorerLoader.GetExplorerUtil(Iapplication)

 

Hope someone can help me.

thanks in advance

 

best reagards,

Martijn van Giels

 

 

2 REPLIES 2
Message 2 of 3
smithmat
in reply to: martijnvangiels

  • I don't have anything to offer regarding your first question.  I would suggesting opening a support case if you have a reproducible case.
  • You can create an IExplorerExtension that shares data with an eventHandler (i.e. they could be in the same dll).  Note that an IExplorerExtension is only loaded for Vault Explorer, but the event handler can be loaded into other processes than Vault Explorer.  Thus, you may need to do different logic depending on whether or not you are in Vault Explorer.  So, for example, you could stash away the IApplication object in OnLogOn (and get rid of it in OnLogOff), and then in your event handler you can make use of the IApplication object (if one was stashed away) or do something different (i.e. don't do your event handler work or perhaps use LoadExplorerUtil) in the case where you are not logged in to Vault Explorer.

Hope that helps,

- Matt

Message 3 of 3
martijnvangiels
in reply to: smithmat

Thank you for this suggestion. I managed to solve the issue .
regards, martijn

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

Post to forums  

Autodesk Design & Make Report