Package com.ptc.windchill.designasmsrv
Class AssemblyBuilderHelper
java.lang.Object
com.ptc.windchill.designasmsrv.AssemblyBuilderHelper
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
- 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 Summary
Modifier and TypeMethodDescriptionCreate and associate new CADDocs to WTParts.voidinitialize(EPMAuthoringAppType authAppType, WTContainer container, EPMWorkspace workspace) Initialize API configurationvoidsetCADNameDerivedFromPart(boolean isCADNameDerivedFromPart) OptionalvoidsetCADNamePrefix(String cadNamePrefix) OptionalvoidsetGeneratedCADNamesIfNotValid(boolean generateCADNamesIfNotValid) Optional, default truevoidvoidsetMatchingRevisionFromPart(boolean useMatchingRevisionFromPart) Optional, default truevoidsetNameDerivedFromPart(boolean isNameDerivedFromPart) OptionalvoidsetTargetFolder(Folder folder) voidsetTemplateNames(String cadAsmTemplateName, String cadComponentTemplateName) required cadAsmTemplateName and cadComponentTemplateName, including extensions
-
Method Details
-
initialize
public void initialize(EPMAuthoringAppType authAppType, WTContainer container, EPMWorkspace workspace) throws WTException Initialize API configuration- Parameters:
authAppType- - requiredcontainer- - optional, if null retrieved from workspaceworkspace- - required- Throws:
WTException-
Supported API: true
-
setTemplateNames
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
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
- Parameters:
folder-
Supported API: true
-
setLocale
- Parameters:
Locale-
Supported API: true
-
createAndAssociateCADDocsFromParts
public WTCollection createAndAssociateCADDocsFromParts(Map<WTPart, CADDocInfo> parts) throws WTExceptionCreate 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
-