Are there code blocks around for write protecting my Revit family’s?
Solved! Go to Solution.
Solved by saikat. Go to Solution.
You can use DocumentChanged event or Dynamic Model Update mechanism to trap any changes and undo them or cancel any save operations on specific files using these two mechanisms.
But this would require your add-in (which will track these changes) to be installed on that specific computer.
You can refer to the DocumentChanged and DynamicModelUpdate SDK samples to begin with. There are other samples in the SDK on these two topics too. Jeremy Tammik's blog, The Building Coder too has many posts on these topics that should help in getting started.
thanks
Update: Since DocumentChanged in read-only event, you will have to use IUpdater framework (Dynamic Model Update) to write protect the family documents by posting error messages after tracking the changes/modifications..
"But this would require your add-in (which will track these changes) to be installed on that specific computer."
is it true? to my understanding, that family w/ registered DMU can also be used in computer w/o add-in being installed.
if it's true then what's the workaround? seems not much use if you want to protect rfa from whatever reason.
I have seen a fan company that has an application that sizes fans according to the fan requirement then selects the family that will not work without the "Sizing Application". If I may give you such an example, you can do something similar and that
thanks Aubit529.
i used DMU quite some time ago, do not remember if that DMU feature is persistent for both rvt and rfa, sounds like it's not persistent, then it's almost useless for "Write Protect my revit Family's" because anyone can modify it by not installing that DMU addin in his/her machine, hope i'm wrong?!