Hello,
My company is having some trouble getting changes made to the material library to stick. It seems like the material library is collaborated on by all users. But this is problematic, because unless these changes are agreed upon by all users, they are lost and the previous data persist.
I tested this by making the shared library read-only, duplicating it and making this 'source' library available only in a dedicated project for editing it. I then created a simple script that, when run, deletes and supplants the old library with this 'source' one. I closed down all open instances of Inventor, opened the source-editing project and made a change to the density of one of the materials, ran the script, effectively eliminating the old data and then relaunched Inventor with a project accessing the newly instantiated shared library. But after all of that the material still had the old value.
My theory, as hinted at above, is that because others still had the shared library open, or something to the effect of still having a stake in the state of its data, I was unable to effectively make changes.
Does anyone have the faintest idea what is actually going on? Is there any way to centralize control of these changes?
Thanks
Solved! Go to Solution.
Solved by Frederick_Law. Go to Solution.
CAD and PLM admin | My ideas | Inventor-Vault Expert GPT (my AI brain)
Unless user Save changes to Library, all changes are local only.
Templates should only have materials from Library.
What exactly does your "script" do?
What kind of "script"? VBA? iLogic?
@Frederick_Law wrote:Unless user Save changes to Library, all changes are local only.
Right, but when a change is saved to the library, how might the change be effectively propagated through the network?
I'm not sure what your point is about templates.
Here is the iLogic rule:
Sub Main()
Const sLibDir As String = "Path/To/Library"
Const sLibFileExt As String = "adsklib"
Const sSrcLibFileName As String = "MaterialLibrarySrc"
Const sProxyLibFileName As String = "MaterialLibrary"
Dim sSrcLibPathName As String = Path.Combine(sLibDir, String.Join(".", {sSrcLibFileName, sLibFileExt}))
Dim sProxyLibPathName As String = Path.Combine(sLibDir, String.Join(".", {sProxyLibFileName, sLibFileExt}))
Dim oProxyLibFileInfo As FileInfo
Try
oProxyLibFileInfo = My.Computer.FileSystem.GetFileInfo(sProxyLibPathName)
oProxyLibFileInfo.IsReadOnly = False
File.Delete(sProxyLibPathName)
Catch
End Try
File.Copy(sSrcLibPathName, sProxyLibPathName)
oProxyLibFileInfo = My.Computer.FileSystem.GetFileInfo(sProxyLibPathName)
oProxyLibFileInfo.IsReadOnly = True
End Sub
@meGVGMF wrote:
@Frederick_Law wrote:Unless user Save changes to Library, all changes are local only.
Right, but when a change is saved to the library, how might the change be effectively propagated through the network?
I believe you totally misunderstand how Material/Style Library works.
Your rule delete a library file and replace it with another one.
If library is shared, there should be only one on the network.
All user use it, period.
If there are multiple copies of library on user computers and network, you need to find a way to "propagate" it to all other locations.
Inventor got nothing to do with that.
On top of that, each file has it's own "library" which you've ignored.
There are at least 3 copies of Library.
One in Library, one in Template and one in document.
@meGVGMF wrote:But after all of that the material still had the old value.
It is getting value from the file, not the library.
User are free to edit and change everything in local file. It won't affect library unless they save it to library.
Check files and templates.
Delete unused local materials/appearance and overwrite used one with one in library.
Attach your file and template.
You did setup project to use library on the network, right?
Appearance Library and Material Library.
Do you have custom library ?
So it turns out, in our directory structure that has a lot of parallel branches, I misread the one where I was deleting and replacing the library, and the script does get the job done while locking down the one that's actually distributed to each user. Thanks for all your time and patience.