cadmageren - Thursday, March 12, 2009 9:57 AM:
Howdy
I am new to Aras, trying to figure out how it works. The system is quite impressive, but of course I have many questions :-)
For my first project, I am trying to make a replacement for an old PDM system: Automanager Workflow implementation, with many AutoCAD and TIF files.
Apparantly it is possible to link the same file to multiple documents. Is it possible to turn this behavior off?
I have been able to setup the "sequence" generator for documents. Is it possible to use the same naming scheme for the files attached to it, (but with different extensions)
Document: 222465
Files:
Sourcefile: 222465.dwg
Viewfile: 222465.dwf
Thanks in advance
Michael Christoffersen
tstickel - Sunday, March 15, 2009 1:24 PM:
Michael;
First, note that the document-file relationship tab only allows you to "created related". This means you can not do a "select related" to associate a file in the Innovator vault to more than one document. So I assume you question is whether there is a way to preclude a user from relating the same external file to multiple documents. An example of what I mean by "relating the same external file to multiple documents" is suppose file ABC.doc is on the user's desktop. He could check that file into the Innovator vault by relating it to the document named "Master One". He could then check that same file into the Innovator vault by relating it to the document named "Master Two". The file ABC.doc would be in the Innovator vault under two different internal IDs.
One way to turn off the ability to link the same external file to multiple documents is to create a server method that is triggered as an "onBeforeAdd" event for the itemtype that holds the document-to-file relationship (I am not at a machine where I can launch Innovator, so I can not give you the exact itemtype name but it is likely "Document File"). The server method would check to see if the file is already related to another document and return an error if it is. The only reasonable way the "onBeforeAdd" method could check to see if a file is being related to more than one document is to search for existing relationships based on the file's name.
Your request for auto-naming the files, based on the name of the document is a little more of a problem. If you able to do this, then it would break the code you wrote to resolve your first problem. If you change file names when they are related to documents then the only check you could do is to see that a document doesn't have the same type of file related twice (e.g. it could only check to see if there would be two 222465.dwg files).
cadmageren - Monday, March 16, 2009 4:08 AM:
Thanks for the reply.
If I use "copy" document from within Innovator, then the new document record is still pointing to the original file. Maybe I do not understand the recommended best practice here... If I copy a document then I expect to ge a completely new and isolated document with new files.
Furthermore if I have a situation where I want to send a set of documents to an external partner, together with "document list report", the document number should be the same as the file names.
But I problably just need to understand the scope better.
/Michael Christoffersen
tstickel - Monday, March 16, 2009 9:59 AM:
Based on how you want "copy" document to work then having the "onBeforeAdd" event trigger a server method appears to me as a potential solution, but it would be complicated. This is because the same "onBeforeAdd" event would be triggered when a new file is being vaulted and also when you "copy" a document that already has relationships with existing files. Your code would have to handle each of these two cases differently.
1. If a new file is being vaulted then you just have to change its name to match the document name.
2. If the "onBeforeAdd" is triggered because you did a document "copy" then the code would have to make a copy of the file (I'm not sure how to do that) and then change its name to match the document's name. I just realized that the documents name would initially be something like "Copy of ....", and the user would likely change that name before they saved the document. So you might also need to write code that is triggered when the document's name is changed; that code would also have to rename the files.
It would take some experimenting to see if this can actually be done.
cadmageren - Monday, March 16, 2009 11:13 AM:
Hi tstickel
I realize that I have to get some more in depth understanding of the system. Thought it was a configuration setting!
But thanks anyway.
/Michael Christoffersen