Windchill常用开发全套整合
- 格式:ppt
- 大小:4.48 MB
- 文档页数:284
Windchill 常用命令和客制化windchill wt.load.util.CSV2XML -input -output -root d:\moduleswindchill markets.CSV2XML -input -output -rootwindchill wt.load.util.CSV2XML -root e:\windchill wt.load.LoadFromFile -u[user name] -p[password] -d d:\modules\users.xml -CONT_PATH /Container=Software/wt.pdmlink.PDMLinkProduct= windchill wt.load.LoadFromFile -u[user name] -p[password] -d d:\modules\users.xml -CONT_PATH /Container=Software/wt.inf.library.WTLibrary=windchill wt.load.LoadFromFile -u wcadmin -p wcadmin -d e:\LoadDoc.xml -CONT_PATH /Container=ptc/wt.pdmlink.PDMLinkProduct=路由器_P1windchill wt.load.LoadFromFile -u wcadmin -p wcadmin -d E:\WMDocumentReview.xml -CONT_PATH /Container=ptcwindchill com.ptc.windchill.partslink.AdminApp -reloadenumCustomizeant -f MakeJar.xmlResourceBuild wt.project.RoleRB trueenumVerify <fully_qualified_EnumClassname>[<language>][<country>][<variant>]例如:enumVerify wt.lifecycle.State fr CAjava wt.util.resource.ResourceBundleUtil wt.part.partModelRBxconfmanager -p用命令导入ldif:windchill engine.util.LDAPImport -dir E:\PTC\Windchill_8.0 -ldiffileE:\PTC\IE_JDBCAdapter\jdbc.ldif将Windchill的核心class文件打包为jar文件命令:makejar.bat 或者 Windchill wt.tools.boot.MakeJar jar=wt.jarconfig=wt.jar.config 或者 Windchill wt.tools.boot.MakeJar jar=wt.jar处理多字节:在wt.properties最后添加wt.db.maxBytesPerChar=3wt.db.encoding=UTF8或者<Property name="wt.db.maxBytesPerChar" overridable="true"targetFile="codebase/wt.properties" value="3"/>JavaGen.sh registry false false true false falseJavaGen registry false false true false false产生CAD代理工作服务: i486_nt\obj\WorkDaemon.exe -InstallD:\Eclipse\eclipse.exe -vm D:\j2sdk1.4.2_06\jre\bin\javaw -vmargs -Xms256M -Xmx512M Attribute Type Logical ID Belong To Catalog------------------------------------------------------------------------------------------------------Extended Type String RootLocalID String persistInfo.objectIdentifier RoothelperName String SearchableNumber String number PartOracle 命令导出命令(全量导出):exp system/system@wind file=f:\wind.dmp full=y statistics=noneexp system/system@wind file=f:\wind.dmp owner=(PDM1,PDM2) statistics=none exp pdm8/pdm8@wind tables=(table1,table2)(增量导出):exp system/system@wind file=f:\wind.dmp inctype=incremental导入命令:imp system/system@wind file=f:\wind.dmp full=y ignore=yimp system/system@wind file=f:\wind(PDMLink).dmp fromuser=PDMLinktouser=PDMLink ignore=yimp system/system@wind file=f:\wind(PDMLink).dmp fromuser=PDM1 touser=PDM2 rows=y indexes=y显示当前连接用户:show user查看数据库的表空间:select * from dba_tablespaces;显示常用的系统文件的视图:v$database,v$datafile,v$logfile,v$controlfile,v$parameter快速清空一个大表:truncate table table_name;查询数据库实例:select * from v$instance;将查询的结果导入到文本文件中:SQL>spool c:\abcd.txt;SQL>select * from table;SQL>spool off;修改字段大小:alter table table_name modify (field_name varchar2(100));修改表名:alter table old_table_name rename to new_table_name;找数据库表的主键字段的名称:select * from user_constraints where constraint_type='P' and table_name='TABLE_NAME';如果导出时出现942的错误,那是进行升级后没有执行:SQL>conn / as sysdba;SQL>%Oracle_home%\rdbms\admin\catexp.sql;删除用户下的所有对象:set linesize 50set pagesize 500spool drop_object.sqlselect 'drop '||object_type||' '||object_name||';' from user_objects;spool off@drop_object.sql;Oracle监听器启动:lsnrctl startOracle监听器停止:lsnrctl stopOracle实例启动:使用sysdba身份登录,输入:startupOracle实例停止:使用sysdba身份登录,输入:shutdown创建远程连接:create database link pdmlink_wind connect to pdm_migration identified by migchangeme using 'fan-10'(pdmlink_wind连接名称、pdm_migration用户名、migchangeme密码、fan-10连接字符串)使用链接:select * from wtpart@pdmlink_windselect a.CLASSNAMEA2A2,a.IDA2A2,b.CLASSNAMEA2A2,b.IDA2A2 where wtpart a,pdmlink_wind.wtpart b where a.IDA2A2=b.IDA2A2;改变使用者口令:alter user pdm identified by pdm;停止OEM:oemctl stop oms sysman/passwd比较表结构:SELECT COUNT(*) FROM(SELECT CNAME||COLTYPE||WIDTH FROM COL@PDJ WHERE TNAME='WTPART'MINUSSELECT CNAME||COLTYPE||WIDTH FROM COL WHERE TNAME='WTPART');我们在建立一个基于原来某个表的结构的时候,就用这个:CREATE TABLE T_NAME AS SELECT * FROM V_TABLE WHERE 1=2执行Oracle数据库碎片整理工具:在生产环境、测试环境中,请定期执行下面的sql,将其中的“pdm7”替换成为实际的数据库用户名,注意在执行该语句的时候一定要将Windchill先停止:execute dbms_stats.gather_schema_stats(ownname => 'pdm7', cascade=>true);该sql的用途是用来整理数据库的碎片程序,从而可以显著提高数据库的存取性能,在各个环境中建议每隔1-2个月执行一次,该语句可以在我们的WCPerfTuningGuide.pdf文档中找到修改游标的最大打开数:在两个文件中可以修改游标的打开数:"SPfile+例程名.ora" 和 "Init+例程名.ora";其中"SPfile+例程名.ora"的优先于"Init+例程名.ora"。
常用业务对象、目录结构、类、包介绍文档控制更改记录目录文档控制 (ii)更改记录 (ii)1. Windchill对象介绍 (i)1.1 Windchill目录结构 (i)1.2 Windchill常用业务对象、类 (i)1.3 Windchill常用包 (iii)1.4 如何在Windchlil系统中查找对象对应的类 (iv)1.Windchill对象介绍(会持续更新此文档)1.1Windchill目录结构●wtCustom放入修改系统的rblnfo文件●wtSateArea下的siteMod文件中放入修改后的系统文件,比如.jspf文件、html, xml;ptcCurrent文件放系统当前版本的文件;ptcOrig放系统最原始的文件ant-f bin/swmaint.xml installSiteChanges●bin:windchill工具目录,如windchill shell●src目录放客制化的源文件,放国际化.rblnfo文件。
●codebase是运行时目录,放编译后的.class文件、放WEB相关文件、放模板文件(.html)●netmarkets:JSP文件●tasks目录放系统服务文件.xml文件, Info*Engine配置文件●valuts:文件仓目录●loadFiles目录,放置需要导入到系统的工作流、生命周期等●Logs:日志目录●loadXMLFiles目录,放置配置系统的信息的.xml文件8,DB目录,放置建立模型后生成的SQL语句●db:数据库映射文件及模型SQL脚本1.2Windchill常用业务对象、类业务对象常用类名描述部件wt.part.WTPart 零部件对象部件wt.part.WTPartMaster 部件master对象部件wt.part.WTPartReferenceLink 部件参考关系部件wt.part.WTPartDescribeLink 部件描述关系部件wt.part.WTPartUsageLink 部件使用关系部件wt.part.WTPartAlternateLink 实现wt.fc.ObjectToObjectLink,全局可替换部件wt.part.WTPartSubstituteLink 实现wt.fc.ObjectToObjectLink,特定可替换部件wt.part.LineNumber 行号部件wt.part.Quantity 数量1.3Windchill常用包1.4如何在Windchlil系统中查找对象对应的类方法一:导航到站点-->"类型和属性管理器",选择部件,这个部件就对应了系统中OOTB对象,wt.part是包名,WTPart是类名称方法二:对象的详细页面,浏览器地址中key(OID)的值包含类名+ida2a2,例如:oid=OR%3Awt.part.WTPart%3A222040.。
经过全球50000多家先进企业长期验证的内容和过程管理系统:不管您是全球集团企业、区域供应商还是小型服务机构,您在设法管理产品内容和开发过程时都面对着各种问题。
比如:产品数据安全、产品数据规范、产品数据的结构化管理、研发流程的规范化、研发流程的自动化、研发效率如何提升?研发成果如何重用?标准化、通用化如何更有效的贯彻执行等。
贵公司的成功依赖于拥有高效的业务过程,并且有效地管理复杂的信息资产,这包括产品设计、工艺、服务、认证、法规符合等相关资料。
Windchill 是一个有着近10年历史的全球一流的生命周期管理系统,经过了全球50000多家先进企业实际应用和长期验证过的内容和过程管理软件,它提供了全面的产品生命周期解决方案。
这个全面的企业业务协同系统具有快速、安全、稳定、成熟和只需一个 Web 浏览器就能访问的特点,它使公司能够更规范的管理产品研发过程,为企业提高研发效率、规范产品研发过程、加快产品上市、提高产品标准化、通用化、降低产品成本、增强企业竞争力等方面提供强大而完整的系统解决方案。
功能及益处•一体化的信息管理系统,单一的产品数据源提高了产品研发效率,并减少了错误和返工;•完整的产品结构化信息管理和协作功能使得企业能够根据需要快速地从多个视角掌握产品的所有信息- 不管信息来自何处;•可重复、端到端的研发流程支持及流程自动化提升了流程效率、加快了产品上市速度,并降低了产品成本;•安全、稳定、符合业界标准的 Internet 体系结构带来了安全、高性能的、多层次研发协同的技术平台;Windchill主要应用模块简介:1、产品数据管理(Windchill PDMLink):a) 在产品整个生命周期中,帮助企业管理和控制产品信息,确保数据的准确、安全、可靠、完整、规范、逻辑关系,管理产品开发过程;b) 优化与固化产品研发流程,使得流程能够通过系统来保证规范、一致、严谨;c) 强大的产品结构管理功能,支持产品配置管理;d) 可一完全根据业务特点定制的、工作流驱动式产品开发过程自动化,内置获得CMⅡ认证的变更管理流程;e) 发布管理功能简化了数据的审核和签发(支持数字化签名)。
windchill系统学习之--开发流程An Overview of the Windchill Development ProcessVerify The Development Environment:Verify the following environment variables: path ,sqlpathVerify the contents of the following property files: wt.properties ,db.propertiesStart the Windchill servers. Open a new console window.Establish your Rose model directory.Model the Object in Rose:Start Rational Rose and check the virtual path map.WT_WORK = ..\windchill\srcWT_EXTENSIONS = ..\windchill\RoseAddInWT_STD_PACKAGES = $WT_EXTENSIONS\Standard PackagesEstablish the initial Rose model by performing the following steps:a. From the File menu, select Open, browse to ..\windchill\src\wt, andload the model WTDesigner.mdl.b. When asked whether to load subunits, press the Yes button.c. Save the model as ..\windchill\src\helloWorld\HelloWorld.mdl.d. When asked whether to save subunits, press the No button.Model the person class by performing the following steps:a. In the Logical View/Main class diagram, drop in a Package icon and labelit helloWorld.b. Use the dependency tool to draw dependencies from helloWorld to the wtand java packages.c. Go to the Main diagram of the helloWorld package.d. Drop on a class icon and give the class the name Item (the parent forPerson). Attributes and operations for Item automatically appear. Changethe diagram to suppress attributes and operations of Item. Ensure that theShow Visibility option is on for Item (so you can see in the diagram that itcomes from the fc package).e. Drop on another class icon and give it the name Person.f. Make Person a subclass of Item. (Use the generalization icon/tool to drawa line from Person to Item.)g. Insert the attributes name, age, title, and id. Name, title, and id should bestrings (String) and age should be an integer (int). Use lowercase or a mixof upper- and lowercase letters for these attributes; do not use alluppercase letters.2 Right click to start the specification dialog. Make allthe attributes public and change the Windchill property of each toconstrain=false. Click the Apply button for each change and, when youare done, click the OK button.h. Select the menu option Browse > Units. Select the HelloWorld packageand press the Control button. Save the unit to c:\ptc\windchill\src\helloWorld\helloWorld.cat. With the helloWorld package selected, pressthe Save button.i. Save the Rose model file. When asked whether to save subunits, click theNo button.Generate Java Classes From Rose:Go to the parent package of the Person class (by selecting the LogicalView/Main diagram from the class browser, then selecting the helloWorld package).From the Tools menu, select Windchill > System Generation.From the popup window, select Java Source Code, WT Introspector Support, and Database Support, then click the OK button.Create Database Tables:Initialize the Object:Design the GUI Layout:Code the GUI:Run the Applet in Mozilla or Internet Explorer:。
常用业务对象、目录结构、类、包介绍文档控制更改记录目录文档控制 (ii)更改记录 (ii)1. Windchill对象介绍 (i)1.1 Windchill目录结构 (i)1.2 Windchill常用业务对象、类 (i)1.3 Windchill常用包 (iii)1.4 如何在Windchlil系统中查找对象对应的类 (iv)1.Windchill对象介绍(会持续更新此文档)1.1Windchill目录结构●wtCustom放入修改系统的rblnfo文件●wtSateArea下的siteMod文件中放入修改后的系统文件,比如.jspf文件、html, xml;ptcCurrent文件放系统当前版本的文件;ptcOrig放系统最原始的文件ant-f bin/swmaint.xml installSiteChanges●bin:windchill工具目录,如windchill shell●src目录放客制化的源文件,放国际化.rblnfo文件。
●codebase是运行时目录,放编译后的.class文件、放WEB相关文件、放模板文件(.html)●netmarkets:JSP文件●tasks目录放系统服务文件.xml文件, Info*Engine配置文件●valuts:文件仓目录●loadFiles目录,放置需要导入到系统的工作流、生命周期等●Logs:日志目录●loadXMLFiles目录,放置配置系统的信息的.xml文件8,DB目录,放置建立模型后生成的SQL语句●db:数据库映射文件及模型SQL脚本1.2Windchill常用业务对象、类业务对象常用类名描述部件wt.part.WTPart 零部件对象部件wt.part.WTPartMaster 部件master对象部件wt.part.WTPartReferenceLink 部件参考关系部件wt.part.WTPartDescribeLink 部件描述关系部件wt.part.WTPartUsageLink 部件使用关系部件wt.part.WTPartAlternateLink 实现wt.fc.ObjectToObjectLink,全局可替换部件wt.part.WTPartSubstituteLink 实现wt.fc.ObjectToObjectLink,特定可替换部件wt.part.LineNumber 行号部件wt.part.Quantity 数量1.3Windchill常用包1.4如何在Windchlil系统中查找对象对应的类方法一:导航到站点-->"类型和属性管理器",选择部件,这个部件就对应了系统中OOTB对象,wt.part是包名,WTPart是类名称方法二:对象的详细页面,浏览器地址中key(OID)的值包含类名+ida2a2,例如:oid=OR%3Awt.part.WTPart%3A222040.。
W i n d c h i l l二次开发常用A P I1.1.根据零件名称/编码得到该零件2.wt.clients.prodmgmt.WTPartHelper.findPartByName(name) ;3.wt.clients.prodmgmt.WTPartHelper.findPartByNumber(number);4.2.根据WTpart得到WTparMaster5.WtPart wtpart;6.WTPartMaster wtmaster=(WTPartMster)part.getMaster();7.3.获取codebase下配置文件wt.properties属性信息8.WTProperties wtproperties = WTProperties.getLocalProperties();9.String wthome = wtproperties.getProperty("wt.home", "");//codebase的文件夹路径10.4.获取part被借用的所有父部件11.QueryResult qr=wt.part.WTPartHelper.service.getUsedByWTParts(WTPartMsterwtMaster);12.注:此方法得到的结果为该part被使用情况的全部父部件,包括了Design视图及Manufacturing视图更包括了父部件使用part的所有修订版本,打印出来可以看到会有相同的部件编号,不同的修订版本.13.5.根据OID 获取Wtpart14.wt.fc.WTReference partRef = newwt.fc.ReferenceFactory().getReference( oid );15.WTPart wtpart=(WTPart)partRef;16.6.得到零件最新版本17.WTPart wtpart= (WTPart)VersionControlHelper.getLatestIteration(part);18.7.通过过滤得到零件最新版本19.QuerySpec querysearch = new QuerySpec(WTPartMaster.class);20.//查询所有的WTPartMaster21.QueryResult queryresult =PersistenceHelper.manager.find(querysearch);testConfigSpec latestconfigspec = newLatestConfigSpec();23.//根据WTPartMaster查询所有最新版本的零部件24.QueryResult allWTPart =ConfigHelper.service.filteredIterationsOf(queryresult,latestc onfigspec)25.8.查询某用户某段时间范围内创建的零件26.QuerySpec qs = new QuerySpec(WTPart.class);27.qs.appendSearchCondition(newSearchCondition(WTPart.class,WTPart.CREATE_TIMESTAMP, true,new AttributeRange(begintime, endtime)));//删选条件时间范围内28.qs.appendAnd();//一定要加上不然下一个条件不能删选29.qs.appendSearchCondition(new SearchCondition(WTPart.class,30."iterationInfo.creator.key",SearchCondition.EQUAL,PersistenceHelper.getObjectIdentifier(n ame)));//删选条件用户31.QueryResult qr = PersistenceHelper.manager.find(qs);32.//今后持续更新if (enumUser.hasMoreElements())user = (WTUser) enumUser.nextElement();}if (user == null) {throw new WTException("系统中不存在用户名为'" + name + "'的用户!");}return user;}}10.windchill 中查询,高级查询,基本查询QuerySpec qs = new QuerySpec();//构造Int index = qs.appendClassList(WTPart.class,true);//添加查询类型,获取类型索引,第2个参数表示“要查询的类型、表”WhereExpression where = new SearchCondition(WTPart.class, WTPart.xx, “=”, xx);//泛型在WC API中的使用//获取查询条件数目If(qs.getConditionCount()>0 && qs.getWhere().endsWith(“")){qs.appendAnd();}//添加查询条件qs.appendWhere(where, new int[]{index});//** 以下是联合查询的API范例。
Windchill集成AD配置手册目录备份 (3)JNDIAdapter配置 (3)创建新信息库“” (4)修改site.xconf文件 (4)注册非Windchill用户 (5)配置Apache用户认证 (5)备份备份WindchillDS数据。
备份数据库Remoteobjectid、remoteobjectinfo 、Owningrepositorylocalobject表。
JNDIAdapter配置wcadmin登录系统后,站点->实用程序->Info*Engine管理,输入Info*Engine管理员密码进入管理页面,选择创建条目->JNDIAdapter 进入JNDIAdapter配置页面创建新信息库“”在Info*Engine管理页面,任务委派管理->管理信息库在下方的创建信息库面板中:信息库名称:信息库类型:com.ptc.windchill-ldapWebject处理器:.pd.Windchill任务处理器:.pd.WindchillWebject处理器和任务处理器字段都应设置为与默认LDAP适配器相同的值(通常是为Windchill Directory Server使用的那个)修改site.xconf文件添加如下信息:<Property name=”.directoryServices” overridable=”true”targetFile=”codebase/wt.properties”value=”$(.defaultAdapter),$(.enterpriseAdapter), .dx.Ad”/>注:配置Windchill启用创建的JDNIAdapter<AddToProperty name=”mapcredentials.admin.adapters”value=” .dx.Ad^cn=applds,ou=applications,dc=cn,dc=com^1234”/>注:配置InfoEngine Task,用来在Windchill系统中检索用户(参与者管理页面)。