Skip to main content
11-Garnet
March 13, 2025
Solved

Create Variant Specification by API

  • March 13, 2025
  • 2 replies
  • 961 views
Hello,
I am using Windchill PDMLink Release 12.0 and Datecode with CPS 12.0.2.23
I would like to programmatically create Variant Specification. As far as I can see in the documentation such customization should be possible.
e.g.
Sample Code for VariantLoadNavCriteriaBean API but the problem is I cannot find
VariantSpecLoaderHelper.service.loadVariantSpecs(beans, partConfigSpecBeans, atoConfigSpecBeans);
The classes for 'VariantSpecLoaderHelper' are not present in the Windchill installation and I do have license and I am able to manually create Variant Specification in the system.
Can you help me to resolve this issue?
    Best answer by HelesicPetr

    Hi @Lukasz1 

    You have to add the library from the Windchill installation to your IDE

    here is example of my configuration in inteliJIdea

    HelesicPetr_0-1742296932473.png

    PS:: I don't have Windchill installation on my IDE client. I have just a copy of the needed libraries from the Windchill structure of the correct version.

    PetrH

    2 replies

    Fadel
    23-Emerald I
    March 17, 2025

    What do you mean by  'VariantSpecLoaderHelper' are not present in the Windchill installation .

    What error are you getting 

    Buiꓘa
    Lukasz111-GarnetAuthor
    11-Garnet
    March 17, 2025

    I've seen the Loading Loading Variant Specifications Using an API , but I cannot find the corresponding helper method which is used in the snipped.

    VariantSpecLoaderHelper.service.loadVariantSpecs(beans, partConfigSpecBeans, atoConfigSpecBeans);

     Can you help me find it?

    Fadel
    23-Emerald I
    March 17, 2025
    Buiꓘa
    23-Emerald IV
    March 17, 2025