Class DesignContextBuilder

java.lang.Object
com.ptc.windchill.designasmsrv.DesignContextBuilder

public class DesignContextBuilder extends Object
DesignContextBuilder is supported class to create/update Design Context(DC) document, CAD alternate representation, and definition/result rules
and delegates call to CARBuilder createAlternateRep() and the corresponding methods

Class contains alternative createDesignContextAlternateRepCatia() method to simplify creation default CAD alternate representation(CAR) for Catia and
Design Context(DC) objects, based on specified parameters:
-top assembly - required
-workspace name - required
-CAD name to specify the DC CAD name - required
-description to specify DC description
* Note: createDesignContextAlternateRepCatia() implementation has the limited functions:
-Support provided for authoring application:CatiaV5
-Use a fixed Catia CAD template name: PTC_CATIA_DesignContext_Template_R24.CATProduct
-Create default definition rule, initialized as "INCLUDE as MASTER REP"
-The Number of DC document is generated, if AutoNumbering is enabled
*

Supported API: true

Extendable: false
  • Constructor Details

    • DesignContextBuilder

      public DesignContextBuilder()


      Supported API: true
  • Method Details

    • initialize

      public void initialize(ESRDocumentInfo info, EPMWorkspace workspace) throws WTException
      Initialize ESRDocumentInfo and workspace
      Note: Must be called to create new Design Context(DC)
      Parameters:
      info -
      workspace -
      Throws:
      WTException -

      Supported API: true
    • initializeAlternateRepContainer

      public void initializeAlternateRepContainer(AlternateRepContainer alternateRepContainer, EPMWorkspace workspace) throws WTException
      Initialize DC alternateRepContainer
      Note: Must be called to update rep rules for existing DC alternate rep container
      Parameters:
      alternateRepContainer -
      workspace -
      Throws:
      WTException -

      Supported API: true
    • initDefaultRuleAction

      public void initDefaultRuleAction(boolean useExcludeActionDefaultRule)
      Init default rule action
      Parameters:
      useExcludeActionDefaultRule - - boolean option to specify default rule action

      Supported API: true
    • addDefinitionRule

      public void addDefinitionRule(EPMRuleActionType actionType, EPMRepRuleType reptype, String[] scope, String statement) throws WTException
      Add definition rule to definitionRules collection set Note: use initialize() or initializeAlternateRepContainer() to initialize definitionRules collection and parameters
      Parameters:
      actionType -
      reptype -
      scope -
      statement -
      Throws:
      WTException -

      Supported API: true
    • addDefinitionRule

      public void addDefinitionRule(EPMRuleActionType actionType, EPMRepRuleType reptype, String[] scope, String statement, int level) throws WTException
      Add definition rule to definitionRules collection set Note: use initialize() or initializeAlternateRepContainer() to initialize definitionRules collection and parameters
      Parameters:
      actionType -
      reptype -
      scope -
      statement -
      level -
      Throws:
      WTException -

      Supported API: true
    • addDefinitionRule

      public void addDefinitionRule(EPMRuleActionType actionRuleType, EPMRepRuleType repRuleType, String[] scope, String statement, int level, int order) throws WTException
      Add definition rule to definitionRules collection set Note: use initialize() or initializeAlternateRepContainer() to initialize definitionRules collection and parameters
      Parameters:
      actionRuleType -
      repRuleType -
      scope -
      statement -
      level -
      order -
      Throws:
      WTException -

      Supported API: true
    • addDefinitionRule

      public void addDefinitionRule(EPMRuleActionType actionRuleType, EPMRepRuleType repRuleType, String[] scope, String statement, int level, int order, EPMDefinitionRuleType definitionRuleType) throws WTException
      Add definition rule and filter to definitionRules collection set Note: use initialize() or initializeAlternateRepContainer() to initialize definitionRules collection and parameters
      Parameters:
      actionRuleType -
      repRuleType -
      scope -
      statement -
      level -
      order -
      definitionRuleType -
      Throws:
      WTException -

      Supported API: true
    • createAlternateRep

      public void createAlternateRep(EPMDocument designAssembly, ConfigSpec configSpec) throws WTException
      Create alternate representation and new DC alternate rep container document, or update rep rules for existing DC
      Parameters:
      designAssembly - - design top assembly EPMDocument
      This parameter is required to create new DC alternateRepContainer document referenced to design top assembly.
      Method initialize() should be called to specify ESRDocumentInfo, and workspace, if provided.

      The parameter can be null or will be ignored for update rep rules in existing DC, if initializeAlternateRepContainer() was used to specify DC alternateRepContainer.
      **Note: DC authoring application is defined from specified designAssembly EPMDocument
      Corresponding to authApp DC template will be defined from preferences
      configSpec -
      Throws:
      WTException - Note: definitionRules, added to rules collection set, will be used to create/update alternate representation

      Supported API: true
    • getAlternateRep

      public AlternateRepresentation getAlternateRep() throws WTException
      Get alternate representation
      Returns:
      AlternateRepresentation
      Throws:
      WTException -

      Supported API: true
    • getAlternateRepContainer

      public AlternateRepContainer getAlternateRepContainer() throws WTException
      Return design context alternate representation container
      Returns:
      AlternateRepContainer
      Throws:
      WTException -

      Supported API: true
    • getAlternateRepDefRules

      public WTCollection getAlternateRepDefRules() throws WTException
      Get alternate representation definition rules
      Returns:
      WTCollection of EPM definition rules
      Throws:
      WTException -

      Supported API: true
    • getAlternateRepResultRules

      public WTCollection getAlternateRepResultRules() throws WTException
      Get alternate representation result rules
      Returns:
      WTCollection of result rules
      Throws:
      WTException -

      Supported API: true
    • removeAlternateRep

      public void removeAlternateRep(AlternateRepresentation alternateRep, AlternateRepContainer alternateRepContainer) throws WTException
      remove AlternateRep
      Parameters:
      alternateRep - - AlternateRepresentation
      alternateRepContainer - - AlternateRepContainer
      Throws:
      WTException -

      Supported API: true
    • createDesignContextAlternateRepCatia

      public AlternateRepresentation createDesignContextAlternateRepCatia(EPMDocument topAssemblyDocument, String epmWorkspaceName, String dsgnContextCADName, String dsgnContextDescription) throws WTException
      Alternate method to create new default alternate representation and design context(DC)
      for Catia with limited settings for Catia template and default rule
      Parameters:
      topAssemblyDocument - - EPMDocument, top assembly EPM document - Required
      epmWorkspaceName - - String, EPMWorkspace name - Required
      dcCADName - - String, Design Context document CAD name - Required
      dcDescription - - String, Design Context document description
      Returns:
      AlternateRepresentation
      Throws:
      WTException -

      Supported API: true