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

JenniferPierron
14-Alexandrite

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

Are you setting CAD Document Number, Name and File Name all to the same value?

Let's use this discussion forum to document your techniques to simplify this for the user.

I am including a proposal below.

PROPOSAL 1:

  • File Name is NOT generated (since deliverables, flexible components, etc.) usually use some part of Part number/name. For example spring.prt, spring.drw, spring.mfg, spring_expanded.prt, etc.
  • Keep all other identifiers driven by File Name (9.1 or 10.0)
    • Use OIRs to drive Number and Name from File name (see attached)
    • Use server-side preferences to prevent File Name from being driven by Name or Number in New CAD Document, Save As and Rename

  • Use Windchill 10.0 Type and Attribute Administrator to remove Number and Name from Layouts of UIs:
    • CAD Document Information Page
    • New CAD Document UI

  • Use Table Displays to remove Number and Name from Tabular UIs (9.1 or 10.0):
    • Workspace Listing
    • Check In
    • etc.
  • Users can continue to refine tables using Windchill 10.0 Table Controls to hide unwanted columns:
    • Users can click on the column headers, choose the black down arrow, "Columns"
    • User can show/hide any currently shown columns this way. The current display will be "sticky" until s/he changes it again (even after closing the browser and restarting a new session).
13 REPLIES 13

Thx. Jennifer

great post...

We are currently moving to PDMLink 10 (from Intralink 3.4) and this post comes to the right time.

We try to setup PDMLink as suggested in this article.

Jennifer,

I like your proposal. We manually set all three to be the same, and it can be tedious.

What do I do with the xml file you attached?

Thank you,

Andy

Hi.

The .xml file is an example of OIRs (Object Initialization Rules) that will:

1. Cause the CAD Document Number and Name to show in Windchill UIs as:

  • Not editable
  • Display the string "(Generated)"

e.g. in the .xml file you see:

<AttrConstraint id="number" 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>

The 2nd line makes the UI display that the number is generated

The 3rd line makes the UI make the "Number" field Read Only.

2. These values will be generated from the CAD Doc "File Name"

e.g. in the file you see:

<!-- set the number to a File Name -->

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

<Attr id="CADName"/>

</AttrValue>

This sets the CAD Doc Number == CADName (the internal name for CAD Doc File Name)

You use this file in the "Object Initialization Rules Administration" UI:

  • Go to your site/org/product
  • Choose "Utilities"
  • Choose "Object Initialization Rules Administration"

In this UI, you will see all the Object Types in Windchill.

I do not suggest modifying the PTC default; but add a new one:

- Choose "New Rule" toolbar button in the OIR Administration UI

- Set the Name to whatever you want (e.g. Custom CAD Document Rule)

- Set the Type to "CAD Document" (you could also set at EPMDoc level; but if you use Dynamic Docs it would not be recommended).

- Then upload my file. It is the same as the default file; except for the changes mentioned above.

Now all Windchill actions (e.g. Upload, Save As, etc.) will set Number and Name to be the same as the CAD Document File name.

Good Luck!

Hi Jennifer,

I am looking to make the number simply autogenerated, I don't want it to inherit the file name. Is this possible?

Thanks Jennifer. I am new to Windchill, but a long time Model Manager user. Windchill is a beast by comparison. I know it can be configured to do what I want, it is just about how to configure it. Here is our scenario (using MM terminology) whenever a model is checked in and later a drawing created:

Masterdata (part record) NAME = inherited from 3D model, DESCRIPTION = inherited from 3D model

|- 3D Model (cad doc) NAME = auto generated, DESCRIPTION = populated from part/assy name in CAD environment

'- 2D Drawing (cad doc) NAME = inherited from 3D model, DESCRIPTION = inerhited from 3D model

We have our CAD environment (Creo Elements/Direct formerly CoCreate) setup so the DESCRIPTION field displays in the model tree, so the human readable names continue to be where people expect them. The NAME field is tied to an attribute called Model Name and shows our automatic part numbers once data has been checked in at least once. So when a model is first checked in, a Part record is created as a container to go with it. They both get the same automatic part number. Later when the drawing is created and checked in, it also gets the same part number. The models and drawings are linked below the Part records. Multiple revisions of models and drawings can live there since uniqueness is a combination of CLASS, NAME, VERSION. Later when BOMs are created, they are maintained by links between the part records. My first real simple question is: does Winchill work the same way?

Setting this up in MM was no big deal, but I am lost in Windchill. Your proposal sounds closely related to what I am trying to do. Are there any white papers or other helpful documentation you can point me at that might give me a clue?

I did download the rule.xml from the Site / OIR Administrator / EPM Document record and compared it to your rule. It really doesn't look like it is "identical except" though the changes may be mostly cosmetic (level of indentation, commentary, order of attributes, etc.). This is a Windchill 10 system, but it has been migrated forward from 8.1 so maybe I am seeing some non-default WC10 rule? See my rule.xml attached.

-- James

sprosser
6-Contributor
(To:JamesOsborn)

Jennifer,

We are currently in our migration from 9.1 to 10, and I hoped to get rid of our "Synchronization" customization when I read your post.

So I merged your OIR proposal with our OIR's and checked the behavior - Looks very promising.

New EPMDocs get synchronized Name, Filename and Number. Exactly what we wanted to have!
Even on "Save As" the three keep in sync. and Name and Number are grayed out in the UI - Perfect.
I probably will hide the Name and Number columns from the UI using the Layouts / Table Displays as you recommended.

The only issue I have is on renaming EPMDoc's - no OIR's are evaluated on Rename... Probably I got some wrong preference settings - you are mentioning that we need to make sure not to drive Filename by Number or Name. Could you please elaborate a little bit on the preference settings you are referring to and which values they should be set to?

Thanks,
Stephan

Stephan,

Did you ever get an answer regarding the Rename function not adhering to the OIRs? I would like to update the rename to key off changes to the filename.

Regards,

Mark Bohannon

sprosser
6-Contributor
(To:MarkBohannon)

Hi Mark

I never got a reply on my rename issue with Jennifers OIR's and settings. So we still have to use two customizations (one to remove the Name and Number from the rename dialog and one to copy and paste the new Filename into Name and Numner.

As you are rethinking rename - what about a multi object rename? This is another rename customization we have in place. Would be great if you coud get it into the overhaul as well (and I coould get rid of the customizatioin)

Regards,

Stephan

Stephan,

Thanks for the feedback. I plan to pursue the exact same customization that you did since we have the same requirement. Can you provide any pointers on what all files (e.g. multirename.js) to look at for customization? I am still pretty new to Windchill customizing and could use a few pointers to get started.

Regards,

Mark Bohannon

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.

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

TomU
23-Emerald III
(To:JenniferPierron)

@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!

JenniferPierron
14-Alexandrite
(To:TomU)

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>

 

 

Announcements