How to set CAD Doc Name = CAD Doc Number less extension rather than = CAD filename less extension ?
By tweaking the OOTB OIRs (to remove the GetServerAssignedConstraint from the "number" AttrConstraints) and setting some Preferences, we have almost got what we need, but not quite. As shown on the screen grab image below (if it is legible...) we have got the CAD filename driving the CAD Doc Number (which has to be unique, and it goes into CAPITALS regardless of the case of the filename), and similalry CAD Doc Name is based on CAD filename but dropping the extension - so it is quite literally becoming the "common name" for associated parts, drawings and WTParts (and these are being autonumbered). The CAD filenames come from an external system, that generates document numbers in CAPITALS. All of this is what we want except the case being used for the CAD Doc Names.
The discrepancy we are left with is due to the different behaviour or Pro/E and SolidWorks, where Pro/E always puts the filename into lowercase, but SolidWorks preserves the case of the filename as it was entered in the UI. As a result, the CAD Doc Names are created in the case set by each of the CAD tools, but the CAD Doc Numbers are always put in CAPITALS by Windchill. What we would like is to get all the CAD Doc Names also put into CAPITALS as well (without the filename extensions), so they can all be searched and browsed more easily.
We have discovered in some early testing of v10.0 for ECAD (where empty ECAD Docs are created first, then ZIP files are attached - so they have to be named and numbered without any reference to the filenames) that we can edit the ECAD OIRs to drive the CAD Doc Name from the CAD Doc Number, and also prevent the user from entering the CAD Doc Name (so they only have to enter one thing). Since the CAD Doc Number is put into CAPITALS by Windchill, we get them both in CAPITALS regardless of what case the user types in for the Number (and we regard this as perfect).
So, we have just tried adding the following to our CAD OIRs (and un-set the Preferences mentioned above), but Name is not being copied from Number.
<!-- set the name to be the same as the number but without the filename extension portion -->
<AttrValue id="name" algorithm="wt.rule.algorithm.Substring">
<Attr id="number"/>
<Arg>0</Arg>
<Value algorithm="wt.rule.algorithm.IndexOf">
<Attr id="number"/>
<Arg>.</Arg>
</Value>
</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>
Can anyone see or suggest what we need to do to stop the CAD filename being used to drive the CAD Doc Name, and let the OIR create the CAD Doc Name instead from the CAD Doc Number (in CAPITALS, and without the filename extension) ?
Any help gratefully received.


