Skip to main content
10-Marble
September 20, 2012
Solved

how to select a default folder based on CAD authoring application in PDMLink v9.1 ?

  • September 20, 2012
  • 16 replies
  • 7725 views

We wish to sort Pro/E files and SolidWorks files into two separate folders in PDMLink v9.1 M062, within the same Product context. How can we set this to happen automatically by default ?

For example we could have the folders /Default/MCAD/ProE and /Default/MCAD/SolidWorks (and each could have more sub-folders for any further 'manual' sorting).

I guess we could create two sub-types of the 'Workgroup Manager CAD Document' type in the Type & Attribute Manager, and then we could quite easily write two simple OIRs that set the specific folders for each sub-type, but in this case how can we associate each of those sub-types with a specific authoring application (in the Type & Attribute Manager) ?

Alternatively, I suppose we make use of the conditional logic facility within the OIRs to select the appropriate folder based on the authoring application, but how would we use the authoring application name within the OIR ?
ie. we want to do something along the lines of...
if AuthoringApplication=PROE then default folder.id= /Default/MCAD/ProE
if AuthoringApplication=SOLIDWORKS then default folder.id= /Default/MCAD/SolidWorks

Any help gratefully received !

Best answer by ngiacom

Hi, for me the solution is:

<!-- set the folder -->

<AttrValue id="folder.id" algorithm="com.ptc.core.foundation.folder.server.impl.FolderPathAttributeAlgorithm">

<Value algorithm="wt.rule.algorithm.CaseBranch">

<Value algorithm="wt.rule.algorithm.EqualsTest">

<Attr id="authoringApplication"/>

<Arg>PROE</Arg>

</Value>

<Arg>/Default/MCAD/Proe</Arg>

<Value algorithm="wt.rule.algorithm.EqualsTest">

<Attr id="authoringApplication"/>

<Arg>COCRDRAFT</Arg>

</Value>

<Arg>/Default/MCAD/Drafting</Arg>

<Value algorithm="wt.rule.algorithm.EqualsTest">

<Attr id="authoringApplication"/>

<Arg>SOLIDWORKS</Arg>

</Value>

<Arg>/Default/MCAD/SolidWorks</Arg>

<Arg>/Default/MCAD/Generic</Arg>

</Value>

</AttrValue>

16 replies

22-Sapphire I
September 20, 2012

People tend to invest HUGE effort into folders - since people are used to file systems. But, in PLM, it's a losing and unnecessary battle.

As soon as you have more than a few hundred objects, it's unrealistic to browse thru Folders. Also, the Folders view lists all Revisions - a major nuisance.

Our humble recommendation - put everything in one bucket and rely on search and collection tools. Use folders only where you need to restrict permissions (supplementing ACLs).

NickD10-MarbleAuthor
10-Marble
September 20, 2012

Hi Mike,

Thank you for the rapid reply.

We don't use many folders at all, but we do want a few in a standard folder structure in each of our 'Products' (and we will have one Product for each of our many projects, thereby reducing the number of folders !). And yes, we do want them so we have the option to restrict access permissions - in this case to allow our project managers a simple way to choose which CAD tool(s) are permitted to be used on each project, as sometimes we want to restrict them to use Pro/E or SolidWorks only.

I think we are only seeing the lastest version (revison.iteration) of CAD files and WTParts in the folders view, and this is certainly OOTB behaviour with the "All" table view as it has the Filter set for Revison = latest, so that doesn't appear to be a problem.

Do you think we are on the right track with either of the approaches I suggested, or is there another way - for example within the Preference manager or wgmclient.ini file settings ?

22-Sapphire I
September 20, 2012

I don't know specifcally how to do it but using logic on the OIR for EPMDocument is proabably the way to go. Contact Kathy Richardson at Paragon Space Development - I think she set up a Numbering prefix based on whether Pro/E or SolidWorks is used - should be able to extend fairly easily.

14-Alexandrite
September 24, 2012

Yes....same notes. Proe WF5?

Have you tested also browser behaviour?

I am attaching a video to make sure that we are understanding which is the desired behaviour. Video Link : 3325

NickD10-MarbleAuthor
10-Marble
September 25, 2012

Yes, that looks like it is exactly what we are trying to do. Has anyone else done this in v9.1 or v10.0 ?

I spent a couple of hours yesterday in a Webex session with the tech support guy from our VAR, and having very carefully checked everything in our OIRs, done full server re-starts, cleared Tomcat and WGM caches, etc, we concluded that we were unable to get a TRUE response from any of the blocks of code such as :

<Value algorithm="wt.rule.algorithm.EqualsTest">

<Attr id="authoringApplication"/>

<Arg>PROE</Arg>

</Value>

We even tried it with StringEqualsTest just in case the examples given in the manuals and on line Help are 'documentation errors', but without success. We are pretty convinced that we have the right attribute names and values, and we have tried it from both SolidWorks (v2010) and Wildfire3.

The Method Server log does not offer any clues, as there are no errors reported. Is there an option to get a more verbose response in that log file ?

We thought of a "1-shot" test to try in the OIR by checking for "name" = <testfilenameX>, to see if we can get anything to return a TRUE response, but after that we can only escalate the call with PTC and write an enhancement request that will no doubt be ignored for v9.1

It would be nice if we could go straight up to v10.0 or v10.1 but the restrictions imposed by the application compatability matrix mean that we have to start with v9.1

1-Visitor
September 6, 2016

Hi Nicola

I need your help, similarly i need to separate CAD files in CAD Document folder and all Documents files in Document folder.

also i need all Promotion request should go to PR folder.

please suggest me code for above mention two cases.

Thank you.

Best Regards

Sharan.

23-Emerald III
September 6, 2016

Set the default folders in the OIR for each object type.

NickD10-MarbleAuthor
10-Marble
September 7, 2016

I agree.  If you just want to sort Types into folders, then its easy to do this in the OIRs.

If you want to sort by MCAD Authoring Application (which by default all use the same Type), then you either have to create sub-types and setup an OIR for each of them, or if you are running v10.2 you can use the conditional logic shown above.  I can confirm this works in v10.2 and we have all our Pro/E and Creo-Parametric files going into one folder, and all the SolidWorks files going into another folder automatically.