Skip to main content
10-Marble
February 9, 2010
Question

How do I get the type of Variance?

I'm trying to figure out if a Variance is a Deviation or a Waiver and not sure how to get that?

I saw this post on how to create a variance as a Deviation or Waiver, but not sure how to reverse the logic

http://portal.ptcuser.org/p/fo/st/topic=16&post=70924#p70924

Right now I've got

if (obj instanceof WTVariance){

variance = (WTVariance) obj;

}

Looking at the Type manager it shows that Deviations and Waivers are soft types of WTVariance, so I tried to put a |com.ptc.Deviation but that didn't work.

I'm sure it's something obvious...

Thx,
Steve D.

(obj WTVariance){

3 replies

avillanueva
23-Emerald II
February 9, 2010
It's a softtype subtype:




Translate
avillanueva
23-Emerald II
February 9, 2010
It's a softtype subtype:

//get logical name of part type

String type =
TypedUtilityServiceHelper.service.getExternalTypeIdentifier(variance);


Translate
10-Marble
February 9, 2010


In Reply to Antonio Villanueva:
It's a softtype subtype:

//get logical name of part type

String type =
TypedUtilityServiceHelper.service.getExternalTypeIdentifier(variance);

That did it!

Thanks!!!

Translate