Skip to main content
1-Visitor
Nov 22, 2012 4:36 PM UTC
Question

Save As with Name inherited from Number

Hi,

It is possible to have (with the Save As for a CAD Document in a Product) the New Name inherited from Number (which is autogenerated)?

In Preference Manager there is no property to say "Inherit New Name From Number".

This is important while the OIR for EPMDocument is modified to create the Name from the autogenerated number, now with Save As I should have the same behaviour.

Thanks

6 replies

12-Amethyst
Nov 26, 2012 2:16 PM UTC

You should be able to set this in preferences by changing "Inherit FileName From Number" under "Save As" to yes. We are on Windchill PDMLink 10 M030 and have that set.

save_as_setting.JPG

Translate
ew_011-VisitorAuthor
1-Visitor
Nov 29, 2012 4:27 PM UTC

Thanks for reply, yes this I have also but I am reffering to the Name not FileName, something like "Inherit New Name from Number".

Translate
12-Amethyst
Nov 29, 2012 4:54 PM UTC

Sorry for he confusion, yeah, as far as I know there is no system switch to make the name field the same as number on a save-as. Like you stated, the OIR can do this for new objects, but save-as does not have the option. We have a similar issue with rename not having an option like I highlighted above for save-as for file name and number equality. The checkbox can be set in the "set new name" function within rename (to set file name = number), but there is no system switch to have that equality set as a system default.

Translate
1-Visitor
Nov 30, 2012 4:50 PM UTC

Maybe you can use a custom processor/service and override whatever method does the saveas? I wish I could be more specific, but I don't use this pbo class in my wc implementation

Translate
14-Alexandrite
Dec 10, 2012 3:14 PM UTC

Hi.

You can use OIRs to cause the name to be "Generated". The value can be generated from the number. In the OIRs you can also determine if the value is over-ridable or not.

So, download the OIRs for CAD Docs. Modify the section (something like this)

<!-- set the name to number -->

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

add these lines:

<Attr id="number"/>

</AttrValue>

Hope this helps.

Jennifer

Translate
12-Amethyst
Oct 28, 2015 5:29 PM UTC

That works Jennifer!

Thank you so much!

This is,what I addet:

<!-- set the name to number -->

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

  <Attr id="number"/>

  </AttrValue>

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

Translate