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

Hello Ramakrishna,

 

Happy new year to you to.

For MBA try below snippet.

 

public static ArrayList<String> getIBAInformationForHardType(String className) {

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

        LogicalIdentifierFactory factory = new LogicalIdentifierFactory();

        TypeIdentifier ti = factory.newWCTypeIdentifier(className);

        GetHardSchemaAttributesCommand command = new GetHardSchemaAttributesCommand();

        command.setType_id(ti);

        try {

            command = (GetHardSchemaAttributesCommand) command.execute();

            AttributeTypeIdentifierSet atis = command.getAttributes();

            Iterator iter = atis.iterator();

            while(iter.hasNext()){

                AttributeTypeIdentifier ati = (AttributeTypeIdentifier) iter.next();

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

                          String name = ati.getAttributeName();

                          System.out.println(name);

                    attributes.add(name);

                }

            }

        } catch (CommandException e) {

            e.printStackTrace();

        }

        return attributes;

    }

 

------------------------------------------------------------------------------

getIBAInformationForHardType("wt.doc.WTDocument")

 

Thanks and Regards,

 

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>