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

Save As with Name inherited from Number

ew
Newbie

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 6

Re: Save As with Name inherited from Number

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

Highlighted

Re: Save As with Name inherited from Number

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

Re: Save As with Name inherited from Number

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.

Re: Save As with Name inherited from Number

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

Re: Save As with Name inherited from Number

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

Re: Save As with Name inherited from Number

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>