Skip to main content
11-Garnet
July 13, 2016
Question

OIR Question

  • July 13, 2016
  • 4 replies
  • 1788 views

Is it possible to specify in an org or site OIR the container id (or name) where an object is stored?  If so, where is this information documented.  Thanks.

--Kirk Wemple

Newell Brands

4 replies

23-Emerald III
July 13, 2016

The value in the folder.id section determines the default location for storing objects created by the OIR.

Documentation is in Windchill Specialized Administration Guide, chapter 5, Understanding Object Initialization Rules, for 10.2 and 11.0 books.

11-Garnet
July 13, 2016

Yes, indeed. The folder.id section can be used to define a folder location of the object being defined in the OIR and is useful if the folder location is common to all contexts.   The question is whether we can apply an OIR at the org or site level to define a container id where all these objects get stored in addition to the folder id for that container.

22-Sapphire I
July 13, 2016

Just for reference - may be useful to others...

We encourage users to create / select folders in general, but enforce keeping all data out of the root of each Product/Library context (/Default).  To do, and also to separate CAD Doc's not explicitly assigned to a folder by users we use the following OIR code for folder.id.  Works great.  We're currently managing Creo and SW as CAD Doc's.

<!-- set the folder, based on Creo or SE, default at /Default) but -->  

<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/CAD Documents - Creo</Arg>

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

                      <Attr id="authoringApplication"/>

                       <Arg>SOLIDWORKS</Arg>

                   </Value>

                   <Arg>/Default/CAD Documents - SolidWorks</Arg>

                   <Arg>/Default</Arg>

       </Value>

</AttrValue>