Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
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:
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:
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:
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
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
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:
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:
Customize your OIRs for CAD Documents and Parts:
CAD Documents:
Generate number from the same algorithm as your Parts
Generate number from the same algorithm as your Parts
Operation > Auto Associate > Find and Create Part Using Base Number=Yes
From the Type and Attribute Management UI, you can remove Name and File Name from the following layouts:
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:
Operations > Upload Operation > Upload > Drop File Extension from Name=No
Operations > General > Base Number Regular Expression
Operation > New CAD Document > Set CAD Document Number Same As Part Number=Yes
Number:
Extension will be in number when Drop File Extension from Number=No
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.
Number:
Autogenerate: Extension will be in number when you use “autogenerate” option and Drop File Extension from Number=No
The base number will be replaced with the Part’s number.
Save As > Inherit FileName from Number=Yes will set File Number to be the same a CAD Document number.
This is likely to be autogenerated
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.
Thanks
Jennifer
Three questions...
Thanks!
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
<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>
<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>