Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Guys,
I'm hoping someone from PTC reads this who can affect change at PTC.
The preference Auto associate truncate file extension does not truncate
the file extension. It trims the name at the last index of '.'
If the EPMDoc name is Bar 2.75"
The WTPart name be truncated to Bar 2
TS has confirmed this and they say RD&E says,
?If the "Auto Associate Truncate Name File Extension" is set then the Auto
Associate code searches for the last index of string pattern "." in the
name of the CADDocument and then drops everything else after that to
create the name for the newly created WTPart to be associated to the
CADDocument. Hence, the behavior you have described in this SPR is the
expected behavior. I am closing this issue as works to spec.?
Are you kidding me!
All it would take to fix this is:
rather than this
part.setName(epmdoc.getName().substring(0, epmdoc.getName().lastIndexOf('.')));
do this
if (epmdoc.getName().equals(epmdoc.getCADName()) {
part.setName(epmdoc.getName().substring(0, epmdoc.getName().indexOf('.'));
} else part.setName(epmdoc.getName());
David Graham
Windchill Developer/Administrator
CAx Administrator
Emhart Glass Manufacturing Inc.
Emhart Glass Research Center
123 Great Pond Drive | Windsor, CT 06095 | USA
Telephone +1 (203) 376-3144 | Telefax +1 (860) 298 7397
Mobile +1 (203) 376-3144 | http://www.emhartglass.com