Skip to main content
1-Visitor
August 28, 2013
Question

Windchill preference - auto associate truncate name file extension

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

2 replies

avillanueva
23-Emerald II
August 28, 2013
Results of a bad spec handed to a programmer who follows it to the letter.
Translate
dgraham-41-VisitorAuthor
1-Visitor
August 28, 2013
I told TS that. They just shrugged.

My sales rep is on the case. He generally gets results.

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 |
Translate