cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Participant

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

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 !

1 ACCEPTED SOLUTION

Accepted Solutions

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

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 16

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

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

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

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 ?

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

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.

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

Hi Mike,

I did contact Kathy Richardson, and she told me that they map an attribute in the OIR to create three types of EPMDocumets 'Production', 'Experimential' & 'Standard', and the desired parameter needs to be entered in the CAD model prior to upload - but they don't differentiate between Pro/Engineer and SolidWorks EPMDocuments.

So what I have put in the OIR to test is as follows :

<!-- set the folder for each MCAD application type - this will only work for two apps as written -->

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

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

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

<Attr id="authoringApplication"/>

<Arg>PROE</Arg>

</Value>

<Arg>/Default/MCAD/ProE</Arg>

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

</Value>

</AttrValue>

I looked in the Type & Attribute manager in v10.0 to find that EPMDocs have an attribute called "authoringApplication" and it has a default value of PROE (from a list of options that goes beyond the width of the dialogue box), but when I tried this OIR with a new Pro/E file it was placed in the SolidWorks folder. I assume this means that I have either not got the right attribute name or a valid value that indicates a Pro/E file, as the logic has resulted in the second option being selected.

Do you know how to check the name of the attribute and the valid values in v9.1, as it is not shown in the Type & Attribute manager ?

tia'

Nick

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

hello

I think the name is OK ... but may be the returned value is not PROE

Authoring application is a hard modeled master attribute. May be when init rules are invoked, you do not have yet the value persisted on the EPMDocumentMaster

regards

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

HI Gregory,

I have tired it with another attribute that already exists in our Pro/E start part (template file), and this is one that is already implicitly mapped (ie. the attribute name is in CAPITALS and matches between Pro/E and Windchill) - but this doesn't trigger the 'true' BooleanBranch either.

I have tried using PROE, proe and Pro/ENGINEER as the test values and none of them makes any difference to the result - it always goes down the 'false' BooleanBranch and puts the file in the SolidWorks folder. The last of these (Pro/ENGINEER) is the one shown on the object info' page, so I wonder if the presence of the "/" character is upsetting the OIR ?

Does anyone have any specific examples of using a Pro/E file parameter name &value to get an attribute & value to use in an OIR ?

Nick

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

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>

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

Hello,

I tried a slightly cut down version of what you suggested, as follows :

<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>SOLIDWORKS</Arg>

</Value>

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

<Arg>/Default/MCAD</Arg>

</Value>

</AttrValue>

As we dont use CoCreate, and I am happy to have anything that is not Pro/E or SolidWorks end up in the /Default/MCAD folder. I also made the name for the ProE folder match the case of the actual folder, and reloaded the OIR, but it still ends up putting the Pro/E files in the /Default/MCAD folder.

The only thing I can think of now is that we need to have the right constraints set in the same OIR file.

May I ask if the code you suggested is working in your system, and if so, what version are you on ?

Best regards,

Nick

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

This solution works on Windchill 10.1 M010 but in my opinion it should work also in previuous versions.

In proe is necessary to upload the epmdocument before the checkin test or to use dm_upload_objects=automatic in config.pro.