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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Loader for Legal Value Lists

MV_10441462
11-Garnet

Loader for Legal Value Lists

Version: Windchill 12.0

 

Use Case: Deployment Automation


Description:

Hi all,

 

As a part of deployment automation I wanted to know if there is any way to Export and Import Type Constraints especially Legal Value Lists easily. Like maybe a Loader file. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @MV_10441462 

You can automate the import of the softtype configuration by OOTB function loadfromfile.

https://www.ptc.com/en/support/article/CS30168

If you create type and attribute configuration you can export it and then use it for import many times you want. 

It exports also all constraint settings.

PetrH

 

View solution in original post

4 REPLIES 4

@MV_10441462 

 

Yes, this is very doable.

I’ve added legal list constraints using a Java utility that I wrote.

Inputs are the Type, the attribute (that the constraint is applied to) , the list of values to be in the legal list.

Works by reading a text file with the appropriate inputs too, which I use for bulk loading.

Works well.

 

I have not tried to do an export but I would think that’s easier to write a utility to do that than to create a constraint.

@d_graham Can you share the snippet to add legal list constraint?

Hi @MV_10441462 

You can automate the import of the softtype configuration by OOTB function loadfromfile.

https://www.ptc.com/en/support/article/CS30168

If you create type and attribute configuration you can export it and then use it for import many times you want. 

It exports also all constraint settings.

PetrH

 

@HelesicPetr Thank you. Yes, just found that the export can be done using TypeDefinitionExporter and import can be done using TypeDefinitionLoader both programatically and LoadFromFile utility. 

Top Tags