ForTheBetterLifeForTheBetterLife仅供内部参考Windchill常用API金航数码科技有限责任公司AVICITForthebetterlife仅供内部参考DocumentPropertiesFileNameStatusWindchill常用API提交签审ChangeHistoryDateAuthorVersionDescription2010/09/10金保涛1.0ApproversApproverApprovalDateComments金保涛金航数码科技有限责任公司AVICITForthebetterlife仅供内部参考目录文档控制....................................................................................................错误!未定义书签。更改记录.............................................................................................错误!未定义书签。目录..........................................................................................................................................iii1.Windchill对象介绍......................................................................................................11.1Windchill夹结构...................................................................................................11.2Windchill基本对象...............................................................................................11.3持久化管理对象..................................................................................................22.文档API介绍...............................................................................................................32.1文档CRUD-API......................................................................................................32.2文档生命周期API................................................................................................42.3文档版本API........................................................................................................53.部件API介绍...............................................................................................................63.1查询部件..............................................................................................................63.2更新部件编号......................................................................................................63.3创建部件..............................................................................................................63.4指定生命周期模板..............................................................................................73.5设定生命周期状态..............................................................................................73.6获取子阶..............................................................................................................73.7获取替代料..........................................................................................................83.8BOM属性.............................................................................................................83.9部件相关文档......................................................................................................84.容器、文件夹API......................................................................................................104.1容器API..............................................................................................................104.2文件夹API..........................................................................................................105.变更API.....................................................................................................................125.1ECN受影响对象.................................................................................................126Windhcill9.1API文档13金航数码科技有限责任公司AVICIT1.Windchill对象介绍1.1Windchill夹结构bin:windchill工具目录,如windchillshellcodebase:编译后的class文件netmarkets:JSP文件db:数据库映射文件及模型SQL脚本loadFiles:导入数据文件模板src目录:源代码文件、资源文件(RbInfo文件)tasks:info*Engine相关的集成以及Task文件valuts:文件仓目录1.2Windchill基本对象wt.part.WTPart:部件wt.doc.WTDocument:文档wt.epm.EPMDocument:图档文档结构:wt.doc.WTDocumentUsageLink相关文档(参考文档):wt.doc.WTDocumentDependencyLinkwt.projmgmt.admin.Project2项目,wt.projmgmt.resource.Deliverable交付项wt.workflow.engine.WfProcess流程,wt.workflow.engine.WfActivity流程活动,wt.workflow.definer.WfProcessTemplate流程模板wt.part.WTPartUsageLinkwt.inf.container.WTContainer,wt.folder.SubFolder文件夹持久化管理:wt.fc.Persistable,wt.fc.PersistenceHelper生命周期管理的对象版本管理的对象wt.change2.WTChangeActivity2,wt.change2.WTChangeOrder2,wt.change2.WTChangeRequest2变更升级对象wt.maturity.PromotionNoticewt.team.Team团队,wt.project.Role,wt.org.WTPrincipal,wt.org.WTUser,wt.org.WTGroup,wt.session.SessionHelper金航数码科技有限责任公司AVICITwt.iba.value.IBAHolder,DefaultAttributeContainer,AttributeDefDefaultView,AbstractValueViewwt.lifecycle.State状态,wt.lifecycle.LifeCycleTemplateReference1.3持久化管理对象wt.fc.Persistable接口所有持续化的对象都实现这个接口wt.fc.PersistenceHelper有一个PersistenceManager属性:managerwt.fc.PersistenceManager接口提供一系列的方法,对持续化对象进行操作;如:delete(),find()等wt.fc.StandardPersistenceManager实现PersistenceManager接口金航数码科技有限责任公司AVICIT2.文档API介绍2.1文档CRUD-API2.1.1创建文档HashMapString,Stringinputdata=newHashMapString,String();inputdata.put(name,doc_name);inputdata.put(folderRef,folderRef);inputdata.put(container,containerRef);TypeIdentifiertypeidentifier=FdnWTContainerHelper.toTypeIdentifier(wt.doc.WTDocument);WTDocumentdocument=ApplicationIntegrationFactory.createDocument(typeidentifier,inputdata,false,SessionHelper.manager