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

Provide the possibility to override auto numbering from OIR during Save-As

Provide the possibility to override auto numbering from OIR during Save-As

Since it is generally considered to be best practice to use auto-numbering for CAD documents, we have set up the Object Initialization Rule on organization level to generate a document number for our designers. Windchill is presenting that newly generated number when a new CAD document is created in Creo, however a designer can override that and enter an alternative filename. At check-in, the number in Windchill is the same as the CAD document's filename.

We would like to have the same functionality in a Save As. The filenames can be modified, but numbers can apparently only follow the OIR that sets the number to be generated. The checkbox that shows the numbers to be generated automatically now cannot be unchecked. This requires the designers to perform a lot of manual renaming to get the number equal to the filename.

3 Comments
DanielKremers
Visitor

Hello Steven!

AFAIK this is current functionality! In the document "Using Creo Parametric with Windchill" tere are additional OIRs. E.g.: "Setting Editable Autogenerated Values".

The key-point is the following part:


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

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

    </AttrConstraint>

This solutions also works for other systems.

As a result you can see the following behaviour:

- Generated number will be offered for new objects and can be overwritten

- In othe dialogues (eg. save as) you have the choise to use a new generated number or overwrite the value with our own choice:

1.png

SNAG-0326.png

There is one bug at the moment (work to spec according to TS): In the integrated borwser - this does not work for "rename" (Stand-alone-Browser is OK).

Hope this helps

Regards Daniel

StevenDumon
Granite

Hi Daniel,

Thank you very much for your answer. When I looked into our OIR's XML file I actually found that what you proposed was already there, but there was another tag blocking possibility of editing the generated number :

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

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

  </AttrConstraint>

When I removed the GetImmutableConstraint, all was solved.

PTCModerator
Topaz I
Status changed to: Archived