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

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

Windchill Customization (BOM)

Nandha
6-Contributor

Windchill Customization (BOM)

Hello 

We have Customized BOM Management in that we are facing issue to get the non-latest version Structure.

 

When the new object is added to the latest version it will show in the non-latest version also by default windchill functionality to overcome this we have to take baseline before revise the cad objects.

Article

Article - CS388641 - Latest version of child part is shown on older version of parent part on structure tab in Windchill PDMLink (ptc.com)

As per the article we tried baseline and filter to the older version.

We could not be able to get it via code, whenever we tried to download a non-latest version. we get the latest structure only.

Help us with a code to get the filtered structure. 

8 REPLIES 8

Hi,

The behaviour of the structure is completely governed by Config Spec Filter, as you already know.

There are 2 possible solutions using the config filter method

1. You could create baseline going to the older version of the Parent Part.

   Call the config filter to use this baseline (It may work even if you call it from the latest version of parent part, as baselines are tied to the specific version of the parent part).

 

2. If the old version of parent part is in a Released state, then you can use "As Matured" Config FIlter. This will reflect the config of the parent part at the time of its Release (by ECN).

 

Both the above options should work for you , try this manually. Then start coding.

I assume that the newer version of the Parent part was created via ECN (Best practice). You need to look into preventing Free Revise by users if its not done by ECN. There are preferences in Windchill to do that.

 

Cheers

Hari

Nandha
6-Contributor
(To:Hari_Vara)

Hello 

 

Thanks Hari

 

Here we need a code/API to get a filtered option (Baseline) Structure.

Is there any code please let us know.

 

Thank you!

HelesicPetr
22-Sapphire I
(To:Nandha)

Hi @Nandha 

You need to find the baseline you want to use and then just create a ConfigSpec

BaselineConfigSpec baselineConfigSpec = BaselineConfigSpec.newBaselineConfigSpec(baseline);

List<ConfigSpec> configSpecList = new ArrayList<ConfigSpec>();
configSpecList.add(baselineConfigSpec);

QueryResult qr = ConfigHelper.service.filteredIterationsOf(wtpMaster, configSpecList);

PetrH 

Nandha
6-Contributor
(To:HelesicPetr)

Dear PetrH

 

After using the code, we are able to get the 1st level objects only. Is there any other code to get all level objects. 

 

 

HelesicPetr
22-Sapphire I
(To:Nandha)

Sure,

This code search for the wtpart version that you provide the master.

So this code does not go through the BOM.

You need to use another method do get the BOM. with config

 

List<ConfigSpec> configSpecList = new ArrayList<ConfigSpec>();
configSpecList.add(baselineConfigSpec);

NavigationCriteria navCriteria = new NavigationCriteria();
navCriteria.setConfigSpecs(configSpecList);

WTPartHelper.service.getUsesWTParts(wtPart, navCriteria);

 

PetrH

Nandha
6-Contributor
(To:HelesicPetr)

Hi PetrH

 

If you are able to share another method, please share the code.

 

Thanks

 

HelesicPetr
22-Sapphire I
(To:Nandha)

Hi @Nandha 

I did.

 

List<ConfigSpec> configSpecList = new ArrayList<ConfigSpec>();
configSpecList.add(baselineConfigSpec);

NavigationCriteria navCriteria = new NavigationCriteria();
navCriteria.setConfigSpecs(configSpecList);

WTPartHelper.service.getUsesWTParts(wtPart, navCriteria);

 

What method do you need? 

PetrH

Nandha
6-Contributor
(To:HelesicPetr)

Hello,

 

Sure, we will try and update. 

 

Thanks for supporting!

 

Announcements

Top Tags