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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How do I get the type of Variance?

sdrzewiczewski
7-Bedrock

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 3

It's a softtype subtype:




It's a softtype subtype:

//get logical name of part type

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




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

Top Tags