Vault Customization

Vault Customization

Reply
Distinguished Contributor
psaarloos
Posts: 150
Registered: ‎12-09-2004
Message 1 of 7 (304 Views)

Hide User Defined Property in Property View

304 Views, 6 Replies
01-17-2013 09:16 AM

Hi,

 

I would like to hide a UDP in the property view of Vault Explorer by API. I know there isn't a straight forward way to do this, because when a user hides a property it's stored in a local XML file.

 

Would it be possible to change the XML in the OnStartUp event of my Vault Extension? Or is the XML file already parsed before on OnStartup event?

 

I am not too familiar with changing XML's programmatically and I don't know the proper way of adding a UDP to the 'hidden section(?) of the XML file.. Any sample is very much welcome!

 

Regards,

Pim Saarloos

Employee
Redmond.D
Posts: 814
Registered: ‎12-12-2006
Message 2 of 7 (296 Views)

Re: Hide User Defined Property in Property View

01-18-2013 07:12 AM in reply to: psaarloos

The local XML files are not officially supported by the API.  So you are mostly on your own figuring how how they work.  Even if you do get something working, the behavior is subject to change without notice for the next release.

 

You might want to see if Project Thunderdome solves your problem.  It can will distribute the grid settings for you to your Vault users.  Just be aware that Thunderdome will do an overwrite of the existing grid settings.  It's doesn't attempt to do a merge or anything.

 

 



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

Active Contributor
orbjeff
Posts: 31
Registered: ‎08-15-2011
Message 3 of 7 (265 Views)

Re: Hide User Defined Property in Property View

02-14-2013 09:03 AM in reply to: psaarloos

Pim,

 

I'm curious, are you trying to hide the UDP because you don't want certain users to edit the UPD value?

 

Jeff Johnson
Technical Consultant
DataWorks MGI | a division of MasterGraphics Inc.
Distinguished Contributor
psaarloos
Posts: 150
Registered: ‎12-09-2004
Message 4 of 7 (260 Views)

Re: Hide User Defined Property in Property View

02-15-2013 10:05 AM in reply to: psaarloos
I want to hide the UPD, because we are using some folder properties to store configurations specific for a certain folder.

The VaultOptions are ideal for storing global configurations, but to be sure the folder configurations are deleted when the folder is deleted we use properties assigned to the folder category.

It would even be better if we could protect these properties from being changed manually, but I know that's not possible. If a user has permissions for the Change UDP role it's not possible to protect certain properties.

It would be nice to have a data property on entities to store some information that only can be accessed from the API...
Active Contributor
orbjeff
Posts: 31
Registered: ‎08-15-2011
Message 5 of 7 (258 Views)

Re: Hide User Defined Property in Property View

02-15-2013 10:34 AM in reply to: psaarloos

Hi Pim,

 

I would suggest evaluating Doug’s post on using the API’s event handler feature. Reconsider the VaultOption and save your folder settings using XML serialization. Associate your saved VaultOption with the folder ID by using a name that is unique to that folder (LoadSettings(m_serviceManager, “CustomConfig.1234”)). Delete the VaultOption when you capture the Folder Delete event and you can match the folder that is about to be deleted with the VaultOption id you specified.

 

//// Folder Events

//DocumentService.AddFolderEvents.GetRestrictions += new EventHandler<AddFolderCommandEventArgs>(AddFolderEvents_GetRestrictions);

//DocumentService.DeleteFolderEvents.GetRestrictions += new EventHandler<DeleteFolderCommandEventArgs>(DeleteFolderEvents_GetRestrictions);

 

Jeff Johnson
Technical Consultant
DataWorks MGI | a division of MasterGraphics Inc.
Distinguished Contributor
psaarloos
Posts: 150
Registered: ‎12-09-2004
Message 6 of 7 (255 Views)

Re: Hide User Defined Property in Property View

02-15-2013 10:42 AM in reply to: psaarloos
That would be a nicer approach indeed, but if I am right you need Admin permissions to be able to set VaultOptions..

In the feature where we use the property to store configurations we restrict changing the configuration through a GUI to certain user groups. However, the property could still be changed manually...
Active Contributor
orbjeff
Posts: 31
Registered: ‎08-15-2011
Message 7 of 7 (253 Views)

Re: Hide User Defined Property in Property View

02-15-2013 10:54 AM in reply to: psaarloos

I see, yes a VaultOption record can only be created and deleted by a Vault admin but non – admins can read the VaultOption records. It’s unfortunate that there isn’t a security option to allow certain roles write access to the VaultOption (or simply deny certain roles UPD editing for that matter). We have successfully restricted users from editing UPD’s on files but I don’t see a way to do it on folders.

Jeff Johnson
Technical Consultant
DataWorks MGI | a division of MasterGraphics Inc.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.