Class AssemblyBuilderHelper

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

public class AssemblyBuilderHelper extends Object
The class to support design CAD documents creation from WTParts parameters, and associate new doc to WTPart:
- required parameters: EPMAuthoringAppType, EPMWorkspace, CAD template document names.
- optional parameters: WTContainer, CADDocInfo iba attributes(can be null) and setting options
Supported:
a) creation new CAD EPMDocument based on WTPart doc type and configured settings
b) association new created CAD EPMDocument to specified WTPart
c) WTPart check out, if WTPart is not new Collect valid WTParts to set of processedWTParts
Collect not valid WTParts to set of ignoredWTParts, if WTPart:
- not persistent
- checked out to other Workspace or locked
- not latest iterated
- not in specified Workspace
- has unsupported type; valid types are only: SEPARABLE and COMPONENT
- has active OWNER association to EPMDocument
- has same name or number, as existing CAD document Create assembly document API will throw Exception for the following parameters verification:
- template docType/subtype values must correspond to CAD document types: CADASSEMBLY or CADCOMPONENT


Supported API: true

Extendable: false
  • Method Details

    • initialize

      public void initialize(EPMAuthoringAppType authAppType, WTContainer container, EPMWorkspace workspace) throws WTException
      Initialize API configuration
      Parameters:
      authAppType - - required
      container - - optional, if null retrieved from workspace
      workspace - - required
      Throws:
      WTException -
      Supported API: true
    • setTemplateNames

      public void setTemplateNames(String cadAsmTemplateName, String cadComponentTemplateName)
      required cadAsmTemplateName and cadComponentTemplateName, including extensions
      Parameters:
      cadAsmTemplateName -
      cadComponentTemplateName -
      Supported API: true
    • setNameDerivedFromPart

      public void setNameDerivedFromPart(boolean isNameDerivedFromPart)
      Optional
      Parameters:
      isNameDerivedFromPart -
      Supported API: true
    • setCADNameDerivedFromPart

      public void setCADNameDerivedFromPart(boolean isCADNameDerivedFromPart)
      Optional
      Parameters:
      isCADNameDerivedFromPart -
      Supported API: true
    • setCADNamePrefix

      public void setCADNamePrefix(String cadNamePrefix)
      Optional
      Parameters:
      cadNamePrefix - will be applied to all new created CAD documents
      Supported API: true
    • setGeneratedCADNamesIfNotValid

      public void setGeneratedCADNamesIfNotValid(boolean generateCADNamesIfNotValid)
      Optional, default true
      Parameters:
      generateCADNamesIfNotValid -
      Supported API: true
    • setMatchingRevisionFromPart

      public void setMatchingRevisionFromPart(boolean useMatchingRevisionFromPart)
      Optional, default true
      Parameters:
      useMatchingRevisionFromPart -
      Supported API: true
    • setTargetFolder

      public void setTargetFolder(Folder folder)
      Parameters:
      folder -
      Supported API: true
    • setLocale

      public void setLocale(Locale locale)
      Parameters:
      Locale -
      Supported API: true
    • createAndAssociateCADDocsFromParts

      public WTCollection createAndAssociateCADDocsFromParts(Map<WTPart,CADDocInfo> parts) throws WTException
      Create and associate new CADDocs to WTParts. required call initialize() and setTemplateNames()
      Parameters:
      parts - - Map WTParts with corresponding CADDocInfo(optional) ibas
      Returns:
      WTCollection of new EPMDocuments associated to WTParts
      Throws:
      WTException - Supported API: true