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

CAD Documents - Tips on how to only set and show File Name

Re: CAD Documents - Tips on how to only set and show File Name

We have the same set up. Filename=name=number.

It's too bad you can't do search or for that matter a customized search with a filename column. The search function does not give you that option.

Re: CAD Documents - Tips on how to only set and show File Name

Hello All.

   In Windchill 11.0, there are new enhancements that allow CAD Document number==name==file name AND the "base number" is based on an auto-generated number which is also used for the Part number.  For example:

  Part Number is 00001234

  CAD Document identifiers are all the same and based on Part number; but contains extensions and suffixes to make it unique:

  • 0001234.PRT
  • 00001234_FLEX001.PRT
  • 00001234.DRW
  • 00001234.MFG
  • etc.

   To use this policy to its fullest, you need to change your focus in the UIs to be on CAD Document Number, since is the only value that can be generated using OIRs.  As a result, you would need to change your displays to hide name and file name.   

Note: If you are not using a WINDCHILL auto-generated number, then you can continue using the techniques previously discussed in this thread that are based on File Name.

 

Steps to base number, name and file name on a Windchill auto-generated number:

  1. Customize your OIRs for CAD Documents and Parts:

    • CAD Documents:

      1. Generate number from the same algorithm as your Parts

      2. Generate name from file name (CADName)
      3. Remove the immutable constraint on number
      4. Ensure that CADName (at least) is displaying “(Generated)” not the pre-generated number.
      5. (see my example attached)
    • Parts
      1. Generate number from the same algorithm as your Parts

      2. Remove the immutable constraint on number
      3. (see my example attached)
  2. Set all relevant server-side preferences (see affects below):
    • Operation > Auto Associate > Find and Create Part Using Base Number=Yes

    • Operation > Auto Associate > Auto Associate Truncate Number File Extension=Yes
    • Operation > Auto Associate > Force Autonumbered Part Creation=No
    • Operation > General > Base Number Regular Expression
    • Operation > New CAD Document > Set CAD Document Number Same As Part Number=Yes
    • Operation > New CAD Document > Synchronize CAD File Name with CAD Document Number=Yes
    • Operations > Upload Operation > Upload > Drop File Extension from Name=No
    • Operations > Upload Operation > Upload > Drop File Extension from Number=No
    • Save As > Inherit FileName from Number=Yes
  3. Hide fields from the UI:
    • From the Type and Attribute Management UI, you can remove Name and File Name from the following layouts:

      1. Default
      2. Create CAD Document
      3. Model Structure Attributes
      4. Primary Attributes
    • Use Table Views to hide name and file namefields from the UIs:
      1. Workspace
      2. Add to Workspace
      3. Check Out
      4. Check In
      5. Undo Check Out
      6. Update
      7. Remove From WS
      8. Etc.
    • Can hide per session Name and File Name using the Customize control in the table column header:
      1. Save As
      2. Rename
  4. Check the effects in all create UIs:
    • Ensure that the file’s extension is used in the CAD Document’s name and number when using upload, New CAD Document, Save As and Rename:

      1. Operations > Upload Operation > Upload > Drop File Extension from Name=No

      2. Operations > Upload Operation > Upload > Drop File Extension from Number=No
    • Ensure that the system is configured to find the “Base Number” (without extension/prefixes/suffixes).   The out of the box system removes any suffixes and extensions.
      1. Operations > General > Base Number Regular Expression

    • When creating both Part and CAD Document from the New Part wizard, ensure that the default is to use the Part’s number for number and file name:
      1. Operation > New CAD Document > Set CAD Document Number Same As Part Number=Yes

      2. Operation > New CAD Document > Synchronize CAD File Name with CAD Document Number=Yes
    • When creating a CAD Document and/or Part using the New CAD Document UI, set it up to use number as the key field.  The following previous preferences will ensure that it is generated correctly:
      1. Number:

        • Extension will be in number when Drop File Extension from Number=No

        • Number generated will not conflict with existing Part numbers if you are using the same algorithm to generate CAD Document and Part numbers.
        • If you need to add a suffix, then the number field defaults to the generated number; but is editable if you removed the immutable constraint in your OIR.
      2. Name will be generated on File Name based on the OIR
      3. File Name will be based on the generated number based on Synchronize CAD File Name with CAD Document Number=Yes.
      4. Part Number:
        • When Force Autonumbered Part Creation=No AND the Part’s number OIR is NOT immutable, then the “Create and Associate Part” checkbox will use the CAD Document’s base number.

        • Base number is found using Base Number Regular Expression.
    • When creating CAD Documents and/or Parts using Save As, set the default file name (and name via OIRs) to be the same as number, because you will either generate the number with an extension OR you will copy the related part’s number:
      1. Number:

        • Autogenerate: Extension will be in number when you use “autogenerate” option and Drop File Extension from Number=No

        • Generate document number based on related Part:
          1. The base number will be replaced with the Part’s number.

          2. Base number is found using the preference, Base Number Regular Expression
      2. Name will be generated on File Name based on the OIR.
      3. File Name:
        • Save As > Inherit FileName from Number=Yes will set File Number to be the same a CAD Document number.

      4. Part Number:  
        • This is likely to be autogenerated

        • Since you are using the same algorithm for CAD and Part numbering, there should be no numbering conflicts.
    • When creating from Creo:
      1. Note: that in Creo 4, you can now use the File > New CAD Document menu to create the CAD Document and/or related Part without needing to go to the WS UI.

      2. Note: Name will be the Number without its extension when Drop File Extension from Number=No.
      3. If for some reason, you didn’t use the auto-generated number for “Name” in the Creo UI, then you can use the Rename action in WS.

  

Thanks

Jennifer

Re: CAD Documents - Tips on how to only set and show File Name

@JenniferPierron,

Three questions...

  1. In the post you say in a couple of places, "see my example attached".  I'm not seeing any attachment.  Can you attach whatever is being referenced to this post?
  2. Was this content copied and pasted from some other article?  I'm looking through the knowledge base but I'm not seeing anything with all of this information in one place.
  3. Do you have (or could you make) a flowchart of this process showing when Windchill interacts with each of these different setting and OIR's?  It would be helpful to visually see when in the process each preference comes into play.  It would probably also help with troubleshooting when something is not working quite right.

Thanks!

Re: CAD Documents - Tips on how to only set and show File Name

Hello Tom.


I am not sure what happened, but you are right.   I cannot access the OIRs I created.   I recreated them and you can see them pasted in this comment below.

 

Thanks

Jennifer

  • CAD Documents OIR:

<AttributeValues objType="wt.epm.EPMDocument">

 

<!-- set the folder -->

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

<Arg>/Default</Arg>

</AttrValue>

 

<!-- set the lifecycle -->

<AttrValue id="lifeCycle.id" algorithm="com.ptc.core.foundation.lifecycle.server.impl.LifeCycleTemplateAttributeAlgorithm">

<Arg>

<!-- Translation of the word "Basic" must be the same as the translation done in commonLifeCycles.xml -->

<?loc-begin key="BASIC_LIFECYCLE_NAME" maxlen="30" match="commonLifeCycles.xml:BASIC_LIFECYCLE_NAME"?>Basic<?loc-end?>

</Arg>

</AttrValue>

 

<!-- set the team template -->

<AttrValue id="teamTemplate.id" algorithm="com.ptc.core.foundation.team.server.impl.TeamTemplateAttributeAlgorithm">

<Arg>Default</Arg>

</AttrValue>

 

<!-- set the number to a generated number -->

<AttrValue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">

<Arg>{GEN:wt.enterprise.SequenceGenerator:WTPARTID_seq:10:0}</Arg>

</AttrValue>

 

<!-- set the name to a CAD Doc file name-->

<AttrValue id="name" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">

<Attr id="CADName"/>

</AttrValue>

 

<!-- set the version info to a generated version info -->

<AttrValue id="MBA|versionInfo" algorithm="com.ptc.core.foundation.vc.server.impl.VersionInfoGenerator">

<Arg>wt.series.HarvardSeries</Arg>

</AttrValue>

 

<!-- specify AttrConstraint tag -->

<AttrConstraint id="lifeCycle.id" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint"/>

</AttrConstraint>

<AttrConstraint id="lifeCycle" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint"/>

</AttrConstraint>

<AttrConstraint id="folder.id" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/>

</AttrConstraint>

<AttrConstraint id="number" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

</AttrConstraint>

<AttrConstraint id="name" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

</AttrConstraint>

<AttrConstraint id="teamTemplate.id" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint"/>

</AttrConstraint>

<AttrConstraint id="teamTemplate" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint"/>

</AttrConstraint>

<AttrConstraint id="organization.id" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue">

<Value algorithm="com.ptc.windchill.enterprise.org.server.impl.OwningOrgDefaultAlgorithm"/>

</Value>

</AttrConstraint>

</AttributeValues>

 

 

 

  • Parts OIR:

<AttributeValues objType="wt.part.WTPart">

 

<!-- set the folder -->

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

<Arg>/Default</Arg>

</AttrValue>

 

<!-- set the lifecycle -->

<AttrValue id="lifeCycle.id" algorithm="com.ptc.core.foundation.lifecycle.server.impl.LifeCycleTemplateAttributeAlgorithm">

<Arg>

<!-- Translation of the word "Basic" must be the same as the translation done in commonLifeCycles.xml -->

<?loc-begin key="BASIC_LIFECYCLE_NAME" maxlen="30" match="commonLifeCycles.xml:BASIC_LIFECYCLE_NAME"?>Basic<?loc-end?>

</Arg>

</AttrValue>

 

<!-- set the team template -->

<AttrValue id="teamTemplate.id" algorithm="com.ptc.core.foundation.team.server.impl.TeamTemplateAttributeAlgorithm">

<Arg>Default</Arg>

</AttrValue>

 

<!-- set the number to a generated number -->

<AttrValue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">

<!-- add a V prefix for variant parts -->

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

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

<Attr id="genericType"/>

<Arg>variant</Arg>

</Value>

<Arg>V</Arg>

<Arg></Arg>

</Value>

<!-- the sequence -->

<Arg>{GEN:wt.enterprise.SequenceGenerator:WTPARTID_seq:10:0}</Arg>

</AttrValue>

 

<!-- set the version info to a generated version info -->

<AttrValue id="MBA|versionInfo" algorithm="com.ptc.core.foundation.vc.server.impl.VersionInfoGenerator">

<Arg>wt.series.HarvardSeries</Arg>

</AttrValue>

 

<!-- name of variant parts -->

<AttrValue id="name" algorithm="wt.rule.algorithm.BooleanBranch">

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

<Attr id="genericType"/>

<Arg>variant</Arg>

</Value>

<!-- assign a name only for variant parts. for others return null.

name should be assigned by the client -->

<Value algorithm="wt.generic.rule.VariantNameGenerator">

<Arg>{GEN:wt.enterprise.SequenceGenerator:variantnameseq:10:0}</Arg>

</Value>

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

<Arg/>

</Value>

</AttrValue>

<AttrValue id="organization.id" algorithm="com.ptc.windchill.enterprise.org.server.impl.OwningOrgDefaultAlgorithm">

</AttrValue>

 

 

<!-- specify AttrConstraint tag -->

<AttrConstraint id="name" algorithm="wt.rule.algorithm.BooleanBranch">

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

<Attr id="genericType"/>

<Arg>variant</Arg>

</Value>

<Value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

</Value>

<Value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

</Value>

</AttrConstraint>

<AttrConstraint id="lifeCycle.id" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint"/>

</AttrConstraint>

<AttrConstraint id="lifeCycle" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint"/>

</AttrConstraint>

<AttrConstraint id="folder.id" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/>

</AttrConstraint>

<!-- Add handling for ProjectLink and PdmLink differently OOTB for wt.part.WTPart object number field

For end items in PDMLink context, turn the autonumbering off -->

<AttrConstraint id="number" algorithm="wt.rule.algorithm.BooleanBranch">

<Value algorithm="com.ptc.core.rule.server.impl.IfContainerTypeEqualsProjectTest"/>

 

<Value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

</Value>

 

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

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

<Attr id="endItem"/>

<Arg>true</Arg>

</Value>

 

<Value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints"/>

 

<Value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

</Value>

</Value>

</AttrConstraint>

 

<AttrConstraint id="teamTemplate.id" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint"/>

</AttrConstraint>

<AttrConstraint id="teamTemplate" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>

<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint"/>

</AttrConstraint>

<AttrConstraint id="organization.id" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

<Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/>

</AttrConstraint>

</AttributeValues>