Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Understanding how changes are committed to a material library stored on a shared network drive, and library centralization

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
meGVGMF
489 Views, 10 Replies

Understanding how changes are committed to a material library stored on a shared network drive, and library centralization

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

Labels (3)
10 REPLIES 10
Message 2 of 11
Gabriel_Watson
in reply to: meGVGMF

Usually, you just have to set everyone's project file to Read-Only on the Use Style setting:
https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Changing-Styles-Li...
Message 3 of 11
Frederick_Law
in reply to: meGVGMF

Unless user Save changes to Library, all changes are local only.

Style-01.jpg

 

Templates should only have materials from Library.

 

What exactly does your "script" do?

What kind of "script"?  VBA? iLogic?

Message 4 of 11
meGVGMF
in reply to: Frederick_Law


@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

 

Message 5 of 11
meGVGMF
in reply to: Gabriel_Watson

So I'm talking about the material library. Does what you said apply to this as well, somehow?
Message 6 of 11
Frederick_Law
in reply to: meGVGMF


@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.

Message 7 of 11
meGVGMF
in reply to: Frederick_Law

There is only one library on the network that everyone uses. Please reread my initial post.
Message 8 of 11
Frederick_Law
in reply to: meGVGMF


@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.

Message 9 of 11
meGVGMF
in reply to: Frederick_Law

I just double checked and I've been testing on a new part file generated from our template, which has no local materials saved (besides "Generic").
Still, though, when I insert the material from the library with the new data to inspect its properties, the old data persist.
Message 10 of 11
Frederick_Law
in reply to: meGVGMF

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 ?

 

Material-06.jpg

Message 11 of 11
meGVGMF
in reply to: Frederick_Law

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.

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

Post to forums  

Autodesk Design & Make Report