Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: Windchill Customization(Giving constraint to an attribute)

$
0
0

Hi RK,

 

To fetch all the IBA's of a given softtype use below method.

public static ArrayList<String> getIBAInformationForSoftType(

                              String internalName) {

                    ArrayList<String> logicalNames = new ArrayList<String>();

                    LogicalIdentifierFactory factory = new LogicalIdentifierFactory();

                    TypeIdentifier ti = factory.newWCTypeIdentifier(internalName);

                    GetSoftSchemaAttributesCommand command = new GetSoftSchemaAttributesCommand();

                    command.setType_id(ti);

                    try {

                              command = (GetSoftSchemaAttributesCommand) command.execute();

                              AttributeTypeIdentifierSet atis = command.getAttributes();

                              Iterator iter = atis.iterator();

                              while (iter.hasNext()) {

                                        AttributeTypeIdentifier ati = (AttributeTypeIdentifier) iter

                                                            .next();

                                        if (!ati.getAttributeName().equals("view")) {

                                                  try {

                                                            String name = ati.toLogicalForm();

                                                            logicalNames.add(name);

                                                            System.out.println("Logical identifier of the IBA :- " + name);

                                                  } catch (Exception e) {

                                                            e.printStackTrace();

                                                  }

                                        }

                              }

                    } catch (CommandException e) {

                              e.printStackTrace();

                    }

                    return logicalNames;

          }

 

Thanks,

Kaushik


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>